Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make histogram aggregates & percentiles configurable globally #1303

Merged
merged 4 commits into from
Jan 28, 2015

Conversation

LeoCavaille
Copy link
Member

No description provided.

@LeoCavaille LeoCavaille force-pushed the leo/histogram_min branch 3 times, most recently from 299bbeb to 24bcaf0 Compare January 16, 2015 11:19
@remh remh self-assigned this Jan 16, 2015
@@ -605,6 +617,10 @@ def __init__(self, hostname, interval=1.0, expiry_seconds=300, formatter=None, r
'ms': Histogram,
's': Set,
}
self.histogram_aggregates = histogram_aggregates\
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should probably be in the Aggregator class so you don't have to duplicate it in all its subclasses.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was my first approach, before realizing that no metric specific (say Histograms for instance) code was in this class, I can put that here but I find it lacking consistency a bit. Maybe I should just refactor more things 😒

@LeoCavaille LeoCavaille force-pushed the leo/histogram_min branch 4 times, most recently from e84a996 to 1cd1c08 Compare January 21, 2015 19:58
@LeoCavaille
Copy link
Member Author

@remh this is should be ready for final review hopefully (allowing per metric type config to be passed, with no special case for histograms)

@remh remh added this to the 5.2.0 milestone Jan 23, 2015
@@ -42,7 +43,7 @@ def testBadPidFile(self):

p = PidFile('test', pid_dir)
path = p.get_path()
self.assertEquals(path, "/tmp/test.pid")
self.assertEquals(path, os.path.join(os.environ.get('TMPDIR', '/tmp'), 'test.pid'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even better:

self.assertEquals(path, os.path.join(tempfile.gettempdir(), 'test.pid')

LeoCavaille added a commit that referenced this pull request Jan 28, 2015
Make histogram aggregates & percentiles configurable globally
@LeoCavaille LeoCavaille merged commit 6f324ec into master Jan 28, 2015
@LeoCavaille LeoCavaille deleted the leo/histogram_min branch January 28, 2015 15:40
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 9b8d250 on leo/histogram_min into * on master*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants