Merge lp://staging/~lucio.torre/txstatsd/make-ewma-sampling-faster2 into lp://staging/txstatsd

Proposed by Lucio Torre
Status: Merged
Approved by: Sidnei da Silva
Approved revision: 64
Merged at revision: 67
Proposed branch: lp://staging/~lucio.torre/txstatsd/make-ewma-sampling-faster2
Merge into: lp://staging/txstatsd
Diff against target: 155 lines (+48/-26)
2 files modified
txstatsd/stats/exponentiallydecayingsample.py (+24/-24)
txstatsd/tests/stats/test_exponentiallydecayingsample.py (+24/-2)
To merge this branch: bzr merge lp://staging/~lucio.torre/txstatsd/make-ewma-sampling-faster2
Reviewer Review Type Date Requested Status
Sidnei da Silva Approve
Review via email: mp+90780@code.staging.launchpad.net

Commit message

make ewma sampling take 23% of the time it takes now

Description of the change

make ewma sampling take 23% of the time it takes now

it also changes the rescale threshold so the difference is never bigger than 600 because:

In [21]: math.exp(717)
---------------------------------------------------------------------------
OverflowError Traceback (most recent call last)

/home/lucio/canonical/txstatsd/fix-memory-issues/<ipython console> in <module>()

OverflowError: math range error

To post a comment you must log in.
Revision history for this message
Sidnei da Silva (sidnei) wrote :

i *think* del self._values[:] gives a better hint to GC than self._values = [], but [citation needed]

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