Merge lp://staging/~beuno/txstatsd/distinct-plugin-webstats into lp://staging/~txstatsd-dev/txstatsd/distinct-plugin

Proposed by Martin Albisetti
Status: Merged
Approved by: Sidnei da Silva
Approved revision: 13
Merged at revision: 11
Proposed branch: lp://staging/~beuno/txstatsd/distinct-plugin-webstats
Merge into: lp://staging/~txstatsd-dev/txstatsd/distinct-plugin
Diff against target: 307 lines (+214/-2)
2 files modified
distinctdb/distinctmetric.py (+74/-1)
distinctdb/tests/test_distinct.py (+140/-1)
To merge this branch: bzr merge lp://staging/~beuno/txstatsd/distinct-plugin-webstats
Reviewer Review Type Date Requested Status
Sidnei da Silva Approve
Review via email: mp+96489@code.staging.launchpad.net

Commit message

Get distinct user stats.

Description of the change

Get distinct user stats.

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

1- theres no need to keep all the attributes of DistinctMetricReporter on DistinctResource
20 + def __init__(self, reporter):
21 + resource.Resource.__init__(self)
22 + self.reporter = reporter
23 + self.dsn = reporter.dsn
24 + self.prefix = reporter.prefix
25 + self.name = reporter.name
26 + self.bucket_size = reporter.bucket_size

2- t1 and t2 both fall in the same bucket! (its only ten seconds difference)

3- you should also exercise the distinct part of the query, adding a repeated value in the bucket making sure it wont add to the count

Revision history for this message
Lucio Torre (lucio.torre) wrote :

maybe we want the get_distinct_count function to take a DateTime object instead of a timestamp? or both?

Revision history for this message
Sidnei da Silva (sidnei) :
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