-
Notifications
You must be signed in to change notification settings - Fork 97
Stats: perform a deepcopy of bucketboundaries when performing measurements #222
Stats: perform a deepcopy of bucketboundaries when performing measurements #222
Conversation
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.
Awesome, thank you for the fix @mayurkale22, LGTM!
Although could you please update the title to |
Make sense, Done. |
693be7a
to
7d1feb7
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.
one small nit, but otherwise looks good!
one other nit, this technically isn't a deep copy, since Object.assign does a shallow copy. In this case it doesn't really matter because both of the arrays are flat number arrays, but just wanted to call it out so it's not confusing later on.
view.recordMeasurement(measurement1); | ||
} | ||
|
||
it('should has points', () => { |
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.
nit: "should have points"
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.
Done. Corrected typos in other existing tests.
…ments While doing measurements, we were reusing bucket boundaries(counts and buckets) from pervious record instead of creating a new copy like other libraries do. Fixes census-instrumentation#221
I agreed, thanks for the explanation. |
While doing measurements, we were reusing bucket boundaries(counts and buckets)
from pervious record instead of creating a new copy like other libraries do.
Fixes #221