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

Merge multiple Histograms into 1. #93

Open
amrx101 opened this issue Aug 18, 2020 · 2 comments
Open

Merge multiple Histograms into 1. #93

amrx101 opened this issue Aug 18, 2020 · 2 comments

Comments

@amrx101
Copy link

amrx101 commented Aug 18, 2020

We are going to use this in mqttwrk where in we launch a bunch of clients. We plan to have a Histogram instance for each connection to measure metrics. After that we would like to merge these histograms to get an aggregation of all histograms.

I was looking at Python docs and found something similar. which supports merge of multiple histograms. Our docs dont mention this explicitly. Do we support this feature?

If not, would you be open to PR where we serialise multiple Histograms and send them over a channel and deserialise each of them and merge. Like a fan in? Would take a bit time as I would have to familiarise myself with the code-base.

@jonhoo
Copy link
Collaborator

jonhoo commented Aug 18, 2020

The method you are looking for is Histogram::add (or Histogram::add_corrected) which lets you add one histogram to another :)

If you think this could be clearer in the documentation, a PR that makes it clearer would be great!

@amrx101
Copy link
Author

amrx101 commented Aug 18, 2020

@jonhoo

Will send a PR with updated doc.

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

No branches or pull requests

2 participants