Merge lp://staging/~theiw/txstatsd/deprecate-meter into lp://staging/txstatsd

Proposed by Ian Wilkinson
Status: Merged
Approved by: Sidnei da Silva
Approved revision: 18
Merged at revision: 15
Proposed branch: lp://staging/~theiw/txstatsd/deprecate-meter
Merge into: lp://staging/txstatsd
Diff against target: 1736 lines (+666/-655)
15 files modified
example-stats-client.tac (+14/-7)
txstatsd/client.py (+114/-0)
txstatsd/metrics.py (+0/-154)
txstatsd/metrics/gaugemetric.py (+22/-0)
txstatsd/metrics/metric.py (+47/-0)
txstatsd/metrics/metrics.py (+80/-0)
txstatsd/processor.py (+0/-140)
txstatsd/protocol.py (+0/-82)
txstatsd/report.py (+0/-46)
txstatsd/server/processor.py (+213/-0)
txstatsd/server/protocol.py (+61/-0)
txstatsd/service.py (+0/-128)
txstatsd/tests/test_metrics.py (+60/-72)
txstatsd/tests/test_processor.py (+54/-25)
txstatsd/version.py (+1/-1)
To merge this branch: bzr merge lp://staging/~theiw/txstatsd/deprecate-meter
Reviewer Review Type Date Requested Status
Sidnei da Silva Approve
Lucio Torre (community) Approve
Review via email: mp+68892@code.staging.launchpad.net

Description of the change

[1] service.py placed at top-level.

[2] client.py placed at top-level

[3] Renamed StatsDClient to TwistedStatsDClient.

[4] report.py to top-level.

[5] processor.py refactored following the style introduced with gauge metric handling.

[6] meter.py to be removed.

To post a comment you must log in.
Revision history for this message
Lucio Torre (lucio.torre) wrote :

 946 + metric = [float(v) for v in values]
 947 + metric.append(key)

 that code seems to imply that the contents of metric could be *values, key
 when in reality it has to be [value, key]
 so maybe it can be replaced with a one liner: metric = [ float(value[0]), key]

review: Approve
Revision history for this message
Sidnei da Silva (sidnei) wrote :

Looks good, although there's a few problems that need fixing before merge. I'll approve it and trust that you'll fix them. :)

[1] Some pep8 warnings:

txstatsd/server/processor.py:124:80: E501 line too long (81 characters)
txstatsd/client.py:51:39: W291 trailing whitespace
txstatsd/client.py:115:1: W391 blank line at end of file

[2] Some pyflakes warnings:

txstatsd/service.py:113: undefined name 'meter'

[3] A test failure:

===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/trial/runner.py", line 575, in loadPackage
    module = modinfo.load()
  File "/usr/lib/python2.7/dist-packages/twisted/python/modules.py", line 383, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "/usr/lib/python2.7/dist-packages/twisted/python/reflect.py", line 464, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "/src/txstatsd/deprecate-meter/txstatsd/tests/test_service.py", line 5, in <module>
    from txstatsd import service
  File "/src/txstatsd/deprecate-meter/txstatsd/service.py", line 12, in <module>
    from txstatsd.processor import MessageProcessor
exceptions.ImportError: No module named processor

txstatsd.tests.test_service

[4] Seems like some files where removed and added again. This not only breaks history but it can also cause conflicts for anyone that has pending branches which get merged after yours. I suggest starting fresh from trunk and reapplying your changes. You could even just take a patch from this branch and apply it on top of a clean branch.

review: Approve
19. By Ian Wilkinson

pep8 and correct failing test.

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