"Fossies" - the Fresh Open Source Software Archive

Member "redis-7.0.5/deps/hdr_histogram/README.md" (21 Sep 2022, 2125 Bytes) of package /linux/misc/redis-7.0.5.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the last Fossies "Diffs" side-by-side code changes report for "README.md": 7.0.0_vs_7.0.1.

HdrHistogram_c: 'C' port of High Dynamic Range (HDR) Histogram


Gitter chat

This port contains a subset of the functionality supported by the Java implementation. The current supported features are:

Features not supported, but planned

Features unlikely to be implemented

Simple Tutorial

Recording values

#include <hdr_histogram.h>

struct hdr_histogram* histogram;

// Initialise the histogram
    1,  // Minimum value
    INT64_C(3600000000),  // Maximum value
    3,  // Number of significant figures
    &histogram)  // Pointer to initialise

// Record value
    histogram,  // Histogram to record to
    value)  // Value to record

// Record value n times
    histogram,  // Histogram to record to
    value,  // Value to record
    10)  // Record value 10 times

// Record value with correction for co-ordinated omission.
    histogram,  // Histogram to record to
    value,  // Value to record
    1000)  // Record with expected interval of 1000.

// Print out the values of the histogram
    stdout,  // File to write to
    5,  // Granularity of printed values
    1.0,  // Multiplier for results
    CLASSIC);  // 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.

$ ./examples/hiccup | ./examples/hdr_decoder