Skip to main content

A simple HdrHistogram plotting script.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hdr-plot-0.6.2.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hdr_plot-0.6.2-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file hdr-plot-0.6.2.tar.gz.

File metadata

  • Download URL: hdr-plot-0.6.2.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.7

File hashes

Hashes for hdr-plot-0.6.2.tar.gz
Algorithm Hash digest
SHA256 28ac543d852fc8b492458cec02f978fa27503b6a404768c0089d1e7752305311
MD5 1bd0a310108b6f45216443bd3d078c4a
BLAKE2b-256 f834cfe0a21e8b2fefecde13a2aa1acb0c95094a61f0bcbbaebcb921be1f2a6b

See more details on using hashes here.

File details

Details for the file hdr_plot-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: hdr_plot-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.7

File hashes

Hashes for hdr_plot-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 796663d8aeb6cf35c353561860e7a8f64c60db126c2751a31967038d91aa3ac3
MD5 70e40ff58efbd2b83b0657819dd87846
BLAKE2b-256 86993f8f89a4b992bf5e01c3ced0efbb60fa864ad082bf21eec45b4e93163680

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page