You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HdrHistogram_c: 'C' port of High Dynamic Range (HDR) Histogram
HdrHistogram
This port contains a subset of the functionality supported by the Java
implementation. The current supported features are:
Standard histogram with 64 bit counts (32/16 bit counts not supported)
All iterator types (all values, recorded, percentiles, linear, logarithmic)
Histogram serialisation (encoding version 1.2, decoding 1.0-1.2)
Reader/writer phaser and interval recorder
Features not supported, but planned
Auto-resizing of histograms
Features unlikely to be implemented
Double histograms
Atomic/Concurrent histograms
16/32 bit histograms
Simple Tutorial
Recording values
#include<hdr_histogram.h>structhdr_histogram*histogram;
// Initialise the histogramhdr_init(
1, // Minimum valueINT64_C(3600000000), // Maximum value3, // Number of significant figures&histogram) // Pointer to initialise// Record valuehdr_record_value(
histogram, // Histogram to record tovalue) // Value to record// Record value n timeshdr_record_values(
histogram, // Histogram to record tovalue, // Value to record10) // Record value 10 times// Record value with correction for co-ordinated omission.hdr_record_corrected_value(
histogram, // Histogram to record tovalue, // Value to record1000) // Record with expected interval of 1000.// Print out the values of the histogramhdr_percentiles_print(
histogram,
stdout, // File to write to5, // Granularity of printed values1.0, // Multiplier for resultsCLASSIC); // Format CLASSIC/CSV supported.
More examples
For more detailed examples of recording and logging results look at the
hdr_decoder
and hiccup
examples. You can run hiccup and decoder
and pipe the results of one into the other.