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

Histogram library #8

Closed
twood02 opened this issue Jan 11, 2015 · 2 comments
Closed

Histogram library #8

twood02 opened this issue Jan 11, 2015 · 2 comments

Comments

@twood02
Copy link
Member

twood02 commented Jan 11, 2015

Write a library in util/hist.c to help generate statistics for large numbers of data readings.

Issue #6 builds a Latency Timer program that measures the round trip delay between a client a server. To be accurate, you want to gather hundreds or thousands of such measurements, but if you just report the average that doesn't give the complete picture. This histogram library will help by providing an easy way to summarize large amounts of data.

The interface should be something like:

// put code in util/hist.h and util/hist.c

/* Create an array with nun_buckets that will store data from min to max */
struct histogram* histogram_create(int min, int max, int num_buckets);

/* Increment the bucket for data_point */
void histogram_inc(struct histogram* hist, int data_point);

/* Print out the histogram bucket counts */
void histogram_print(struct histogram* hist);

You should use uint32 or uint64 types instead of ints!

@akorzan
Copy link
Contributor

akorzan commented Feb 2, 2015

I would like to claim this issue for the next two days.

Sincerely,
Anthony

@twood02
Copy link
Member Author

twood02 commented Apr 21, 2015

closed by #91

@twood02 twood02 closed this as completed Apr 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants