Merge lp://staging/~wesmason/txstatsd/fix-counters into lp://staging/txstatsd

Proposed by Wes Mason
Status: Merged
Approved by: James Westby
Approved revision: 114
Merged at revision: 112
Proposed branch: lp://staging/~wesmason/txstatsd/fix-counters
Merge into: lp://staging/txstatsd
Diff against target: 170 lines (+86/-13)
3 files modified
txstatsd/metrics/countermetric.py (+5/-2)
txstatsd/server/configurableprocessor.py (+16/-6)
txstatsd/tests/test_configurableprocessor.py (+65/-5)
To merge this branch: bzr merge lp://staging/~wesmason/txstatsd/fix-counters
Reviewer Review Type Date Requested Status
James Westby (community) Approve
Review via email: mp+246021@code.staging.launchpad.net

Commit message

Fix ConfigurableMessageProcessor not processing counter stats correctly, and add rate tests.

Description of the change

This a fix for ConfigurableMessageProcessor to actually update the value for counters rather than overwriting, and flushes correctly too.

Patch by ~james-w, and I've tested it with values from canonistack deployed SSO and and manually with `nc`.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

Hi,

Is there a test in the other processor for the RATE regex matching that we could
co-opt here? Or maybe there's even a way to re-use that code directly.

Thanks,

James

Revision history for this message
Wes Mason (wesmason) wrote :

Will investigate, I think we discussed that before the Christmas break but I'd forgotten.

Thanks!

Revision history for this message
Wes Mason (wesmason) wrote :

There's no ready-to-reuse RATE test so working on one.

Revision history for this message
Wes Mason (wesmason) wrote :

Added tests to ensure rate is picked from stat datagram and that both whole and fractional decimals are parsed (and applied to the rate correctly).

Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: