-
Notifications
You must be signed in to change notification settings - Fork 5
feat(stats): calculate packet rates #815
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
Conversation
767001e
to
fd77a5d
Compare
Signed-off-by: Sergey Matov <[email protected]>
fd77a5d
to
e4dcaef
Compare
8221155
to
d64e269
Compare
6b7b586
to
5104932
Compare
b98bcdb
to
1ef6d8e
Compare
Signed-off-by: Sergey Matov <[email protected]>
Signed-off-by: Sergey Matov <[email protected]>
1ef6d8e
to
eb16a28
Compare
d02c903
to
f16a6db
Compare
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 don't have the full context here, and I didn't review in-depth - but assuming the PR is ready for review, it seems to me like this misses unit tests to validate the processing, in particular to validate the Smooth
implementation.
6e4ec54
to
6c4ffec
Compare
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.
Looks good overall, although I haven't been as far as checking the smoothing algo. Thanks for adding the unit tests!
I've got some minor nitpicks, they should all be trivial to address.
I'd welcome a bit more of context in the commit descriptions - I don't like empty commit descriptions. In something like “No more double-counting for packets”, for example, I'd love to find an explanation of the problem we solve: how comes that we had double-counting, and how do we solve it? Or in “smoothing instead of derivative”, it would be nice to mention why we want to switch from the latter to the former. It is more work, but it makes life so much easier when someone looks at the Git history later to try to understand a change.
stats/src/dpstats.rs
Outdated
} | ||
} | ||
|
||
// Push the cumulative snapshot into the SG derivative filter |
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.
What's SG, I suppose it's “Savitzky-Golay”? Please expand the first time you use it in the comments.
// Push the cumulative snapshot into the SG derivative filter | |
// Push the cumulative snapshot into the Savitzky-Golay (SG) derivative filter |
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.
Here as well, this comment is not exists in latest revision of the file :)
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.
Here, it doesn't matter, I'd still like you to expand the acronym the first time you use it in the file, whether it's this comment or another. There definitely are occurrences of this acronym in your latest revision.
Signed-off-by: Sergey Matov <[email protected]>
6c4ffec
to
7c827ae
Compare
@qmonnet thanks for the review. In general we are saving Savitsky-Golay derivative calculation cause in particular it's should give same results using different approximation formula. The reason we picked smoothing instead - during tests it showed more stable results, so there is no algorithm decisions was made but based on practical usage. |
Thanks for the context ❤️. Don't hesitate to add it to the commit descriptions next time, this is where I search for it first when I want to understand a code change. |
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'd still like the SG acronym to be expanded once, but this is not a blocking issue. PR seems good from my side otherwise. Thanks!
No description provided.