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

plot: Sort data points by time elapsed #398

Merged
merged 2 commits into from
Apr 29, 2019
Merged

Conversation

tsenart
Copy link
Owner

@tsenart tsenart commented Apr 28, 2019

This PR makes the Plot.data method return dataPoints sorted by
their X axis value (i.e. elapsed seconds)

Previously, each series would be added discontinuously to each other,
essentially not being merge-sorted correctly.

Additionally, the output color palettes were made more intuitive. Reds for
any labels that contain the word ERROR. Greens otherwise.

Any plot with more series than the available colors will be hard to
read because the colors will cycle.

Fixes #391

tsenart added 2 commits April 28, 2019 16:22
This commit makes the `Plot.data` method return `dataPoints` sorted by
their X axis value (i.e. elapsed seconds)

Previously, each series would be added discontinuously to each other,
essentially not being merge-sorted correctly.

Fixes #391
This commit makes the output color pallettes more intuitive. Reds for
any labels that contain the word ERROR. Greens otherwise.

Any plot with more series than the available colors will be hard to
read because the colors will cycle.
@tsenart tsenart requested a review from xla as a code owner April 28, 2019 16:22
@tsenart
Copy link
Owner Author

tsenart commented Apr 28, 2019

@mightyguava: Please take a look. This is how your data will look like after this PR. Please note that I set the log-scale to 50 in the HTML plot, but that's not the default.

vegeta-plot

@mightyguava
Copy link

Looks good. Thank you!

@tsenart tsenart merged commit 620397c into master Apr 29, 2019
@tsenart tsenart deleted the plot-sort-datapoints branch April 29, 2019 08:29
@zachbadgett
Copy link

IMO this PR makes the plots harder to read in some cases; maybe a similar flag to -name should be added called -color to override the default or, if that's too specific of a flag, add the ability to add labels, then the plot command can read those.

@tsenart
Copy link
Owner Author

tsenart commented Jan 12, 2020

@zachbadgett: What visual changes do you think would make things easier to read? Can you provide some specific examples?

@zachbadgett
Copy link

@tsenart it's when you have multiple shades of same color (e.g. two green colors) they can blend in with each other. Being able to set distinguishable colors would help with that. For an example, user wants to compare the results from 100qps and 200qps ; current functionality would put them on the chart as two different shades of green which can be hard to read. With what I'm suggesting, the user can pass which color they would want to use during the attack:

vegeta attack -name=100qps -label color=green -label error=#EE7860
vegeta attack -name=200qps -label color=blue

The labels get passed downstream, plot will read the labels it supports and renders the results with the colors specified.

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.

Plot not starting at t=0 when there are error responses
3 participants