Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module: plot: add dynamic plot type #8

Draft
wants to merge 1 commit into
base: general-cmd
Choose a base branch
from

Conversation

jkoeppeler
Copy link

This tries to add a new plot type. The motivation behind this is to plot the throughput over timer for a particular test run.
The data format in results.json is expected to be

{
     /*example snip*/
     "Time_list": [1,2,3,4],
     "Mbit_list": [100,99,105,50]
}

@jkoeppeler
Copy link
Author

jkoeppeler commented Sep 6, 2024

First draft, it will need some additions in MoonGen Tester to add the lists of the mg.throughput.csv to the result.json but wanted to get early feedback what you think about this idea of this plot type. All feedback is welcome!
Latex-format is not supported yet, and most of it is a copy of Plot_simple.

@jkoeppeler jkoeppeler marked this pull request as draft September 6, 2024 20:03
@jkoeppeler jkoeppeler changed the title module: plot: initial draft for dynamic plot module: plot: add dynamic plot type Sep 6, 2024
@nemethf
Copy link
Collaborator

nemethf commented Sep 9, 2024

Thanks.

Looking at the code, it seems you want to have strings in the x-axis like in this example. Is that right? It would be good if you could write a simple example containing result.json and a latex file as well.

If the goal is to support "symbolic x coords", then I think it is easier just to extend Plot_simple with a boolean configuration variable named symbolic_x_coords.

@jkoeppeler
Copy link
Author

ah sorry about the symbolic coords, my mistake this was some left over from another test. I will remove this. So I just want have numerical values on both x and y axis. I will provide a simple result.json for testing.

@nemethf
Copy link
Collaborator

nemethf commented Sep 9, 2024

No problem. But then I don't know what is this about. At any rate, the development is mostly on branch general-cmd. Maybe it is better to create a pull request against it (if it is possible.)

@jkoeppeler
Copy link
Author

A test run has a duration. On every second Moongen records the current throughput. I want to plot the throughput over time, so that I can observe the dynamic behavior of the SuT. See as example for the rough idea the first figure in https://blog.tohojo.dk/2017/04/the-story-of-flent-the-flexible-network-tester.html . Especially the top plot of the three.

Happy to change it to general-cmd branch.

@jkoeppeler jkoeppeler changed the base branch from master to general-cmd September 9, 2024 15:15
@nemethf
Copy link
Collaborator

nemethf commented Sep 9, 2024

So, instead of calculate a data-point from many measurements, you'd like to create a curve from one measurement? We have a mostly undocumented feature for this: https://github.com/hsnlab/tipsy/tree/general-cmd/doc/examples/datafile

The trick there is to use variable substitution for the value for the "datafile".

@nemethf
Copy link
Collaborator

nemethf commented Sep 9, 2024

(The example was actually wrong. I've now fixed it.)

@jkoeppeler
Copy link
Author

ah thanks, now the plot makes more sense. I think this could technically work for my use case. Just out of curiosity: what was the design decision for this data file format? To me, it would make more sense to have the data from the datafile.data also embedded in the results.json. Just want to make sure I understand. Thank you :)

@nemethf
Copy link
Collaborator

nemethf commented Sep 9, 2024

If this data is part of the results.json, then I think mongo-query is powerful enough to convert it to whatever format is necessary for a complex plot.

I don't remember why we choose this format. I think the whitespace separated columns is the default import format in gnuplot. We had these time-based plots (latency as a function of time) for each configuration (say window-size). But we weren't interested in these. We wanted to plot the average latency as a function of window-size. Then in turned out we quickly had to plot latency curves as a function time for several window-sizes in the same plot, i.e., four curves when each curve corresponds to one window-size.

Anyway, if you have a cleaner design, I'm happy to incorporate it into tipsy.

@jkoeppeler
Copy link
Author

Thanks! I will then just go ahead and try to embed the data into the results.json and ping you if I am done, and then we can discuss again :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants