Open
Conversation
Signed-off-by: Zach <zachmgoldstein@gmail.com>
480574c to
073e1c4
Compare
clalancette
requested changes
Oct 25, 2022
Contributor
clalancette
left a comment
There was a problem hiding this comment.
Besides the questions inline, it would also be great to have tests for this new functionality.
|
|
||
| output->minor_pagefaults = std::accumulate( | ||
| this->sample_buffer.minor_pagefaults.begin(), | ||
| this->sample_buffer.minor_pagefaults.begin() + this->cleared_iteration + 1, |
Contributor
There was a problem hiding this comment.
Why are we adding 1 here? Won't that always skip a sample somewhere along the way?
Comment on lines
+806
to
+811
| // Reset the properties of the current results | ||
| this->results.max_latency = this->sample_buffer.latency_samples[i]; | ||
| this->results.min_latency = this->results.max_latency; | ||
| this->results.mean_latency = this->results.max_latency; | ||
| this->results.minor_pagefaults = this->sample_buffer.minor_pagefaults[i]; | ||
| this->results.major_pagefaults = this->sample_buffer.major_pagefaults[i]; |
Contributor
There was a problem hiding this comment.
I could be wrong in my understanding here, but this isn't really "clearing" the results. What it is doing is setting a marker at the current set of samples, and then we'll only consider samples from this point forward.
If my understanding is correct, then I think we should rename this function to reflect that usage more. Maybe "mark_statistics" or something like that?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
See #117
Implements the functionality for clearing all statistics in the sample buffer
and the results struct by adding a API method that the user can call
while rttest is running.