Incorrect Wrap in nonNegativeDerivative
Bug #660861 reported by
Tony Bunce
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Graphite |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I think the wrapping/rollover calculation used in nonNegativeDeri
This is the current formula that is being used:
newValues.append( prev + (maxValue - val) )
I think the correct formula is:
newValues.append( val+ (maxValue - prev) + 1 )
or
newValues.append( maxValue + (prev- val) + 1 )
Look at "Counter Wraps" here:
http://
For example on a 32 bit snmp counter:
MAX: 4294967295
Reading 1: 429496700
Reading 2: 100
Delta = -429496600
graphite value = ( 429496700 + (4294967295 - 100) ) = 4724463895
RRD Value = 429496700 + (4294967295 - 100) + 1 = 3865470696
I think 3865470696 is the correct value
Changed in graphite: | |
status: | New → Confirmed |
Changed in graphite: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
You're absolutely right, committing this fix to trunk.