-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improve octetDeltaCount calculation #251
Conversation
9e9e04b
to
eefc63f
Compare
Codecov Report
@@ Coverage Diff @@
## main #251 +/- ##
==========================================
+ Coverage 76.23% 76.26% +0.03%
==========================================
Files 17 17
Lines 2365 2368 +3
==========================================
+ Hits 1803 1806 +3
Misses 393 393
Partials 169 169
Flags with carried forward coverage won't be shown. Click here to find out more.
|
6906339
to
c5b5011
Compare
c5b5011
to
017c39e
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.
LGTM
Signed-off-by: heanlan <anlan9771@gmail.com>
017c39e
to
f2e5883
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.
LGTM. How does it work in Antrea?
It works well in Antrea, referring to antrea-io/antrea#2692 |
c1e9be9
to
dc9feef
Compare
dc9feef
to
c732167
Compare
follow up in #270 , closing now |
Currently when we calculate
octetDeltaCount
for aggregated records, we are summing up the values from all incoming records. This approach leads to an issue that, in the case of inter-node flows, we will receive records from both source and destination node for the same flow, which makesoctetDeltaCount
approximate to 2*real value.To make it more accurate, we change the update logic to:
new_octetDeltaCount = max(new_octetDeltaCountFromSource, old_octetDeltaCount)
, if the incoming record is from source node;new_octetDeltaCount = max(new_octetDeltaCountFromDestination, old_octetDeltaCount)
, if the incoming record is from destination nodefixes: #250