-
Notifications
You must be signed in to change notification settings - Fork 143
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
percentiles chart #66
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f8a7526
add percentiles chart
brenol 5a13182
Merge pull request #1 from nakabonne/master
brenol 127297e
add percentiles chart
brenol 35358a2
add tests
brenol f6c3132
use pointer directly
brenol cf3f3a6
no need to use newMetrics anymore; just calculate after metrics.Add i…
brenol 58fc946
a few renames so its more concise with the rest of the code
brenol 4ba3412
fix test values
brenol 245c090
formatting
brenol 71969b4
handle floating point milliseconds (such as 0.5, 1.5, etc)
brenol ca7e827
fix percentiles tests & finish
brenol 9a4c3d9
remove (now) unnecessary cast to float64
brenol 15054ed
fix typo & rephrase
brenol f03a0b2
rename p99/p95/p90 etc so its clear that we are talking about legends
brenol 2d5bc7a
add missing error handling
brenol e7c22da
add the possibility to move forward (with L & l) and backwards (with …
brenol 55a02ea
fix found data races
brenol cc7c887
use ubers atomic pkg instead
brenol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm running into an issue about data races when running it at a high rate. There seems to be a data race between calculating the quartiles for the chart and calculating them for metrics reporting.
It's preferable to re-use a single quantile, but if it gets too complicated, you may want to revert back to it for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if it's a little too heavy to use the
sync.Mutex
every time, but I haven't been able to confirm it yet. I'll check it in a few hours.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting data race. I'll have a look at it.
From what I gathered, commenting out sendMetrics actually fix that data race but that is not good. I think a mutex, in the case for performance will actually be OK, but it'll be all around the code:
Also, I just hit another data race, which happens with commented sendMetrics + starting a new attack:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, changed to a Mutex and fixed both data races. (the one you found and the one I found after)
I did not see a performance hit, but I did not use a lot of workers though.
I tried first with a RWMutex but it did not work. Not sure why though.