Skip to main content

hdr-plot for HdrHistogram

A standalone plotting script for https://github.com/giltene/wrk2 and https://github.com/HdrHistogram/HdrHistogram.

This is just a quick and unsophisticated script to quickly plot the HdrHistograms directly from the output of wkr2 benchmarks.

For example:

myplot.png

how to run

installation:

pip3 install --upgrade --user hdr-plot

usage:

usage: hdr_plot.py [-h] [--output OUTPUT] [--title TITLE] [--nosummary]
                   [--noversion] [--units UNITS]
                   [--percentiles-range-max PERCENTILES_RANGE_MAX]
                   [--summary-fields SUMMARY_FIELDS]
                   files [files ...]

Plot HDRHistogram latencies.

positional arguments:
  files                 List HDR files to plot

optional arguments:
  -h, --help            show this help message and exit
  --output OUTPUT       Output file name (default: latency.png)
  --title TITLE         The plot title
  --nosummary           Do not plot the summary box
  --noversion           Does not plot the version of hdr-plot
  --units UNITS         The latency units (ns, us, ms)
  --percentiles-range-max PERCENTILES_RANGE_MAX
                        The maximum value of the percentiles range, e.g.
                        99.9999 (i.e. how many nines to display)
  --summary-fields SUMMARY_FIELDS
                        List of fields to show in the summary box. A comma-
                        separated list of: min, max, mean, median, p50, p90,
                        p99, p999, p9999, ..., p999999. Default:
                        median,p999,p9999,max

Then run wrk with the -L option and store the output into a file, like:

wrk -t2 -c100 -d30s -R2000 -L http://127.0.0.1:8080/index.html &> result.out

Finally plot the percentile distribution:

hdr-plot --output myplot.png --title "My plot" ./result.out [...]

You can provide more files to be plotted on the same graph:

hdr-plot --output myplot.png --title "My plot" ./sample/file1.out ./sample/file2.out ./sample/file3.out

Please note that the name of the file is used as label for the plot legend.

Acknowledgements

A special thank to @Manuelbernhardt for providing PRs for a lot of improvements!

License

Copyright © 2018-2023 Bruno Bonacci - Distributed under the Apache License v 2.0

Release files for hdr-plot 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hdr-plot 0.6.2
File Size Uploaded
hdr-plot-0.6.2.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hdr-plot 0.6.2
File Interpreter ABI Platform
hdr_plot-0.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.7 kB

Release files / hdr-plot-0.6.2.tar.gz

Download URL hdr-plot-0.6.2.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
28ac543d852fc8b492458cec02f978fa27503b6a404768c0089d1e7752305311
BLAKE2b-256 checksum
How to use checksums
f834cfe0a21e8b2fefecde13a2aa1acb0c95094a61f0bcbbaebcb921be1f2a6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.7

Release files / hdr_plot-0.6.2-py3-none-any.whl

Download URL hdr_plot-0.6.2-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
796663d8aeb6cf35c353561860e7a8f64c60db126c2751a31967038d91aa3ac3
BLAKE2b-256 checksum
How to use checksums
86993f8f89a4b992bf5e01c3ced0efbb60fa864ad082bf21eec45b4e93163680
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.6.2 This release

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.2.3

2 release files

0.2.0

2 release files

0.1.7

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page