brunobonacci / hdr-plot Goto Github PK
View Code? Open in Web Editor NEWA simple standalone script to plot HdrHistograms directly from the output of wrk load testing tool
License: Apache License 2.0
A simple standalone script to plot HdrHistograms directly from the output of wrk load testing tool
License: Apache License 2.0
Thank you for this script, it surely makes life easier :)
When used with several files, displaying the correct label is a bit of a heuristic process, though. I could rename my files, but generally, perhaps it could be improved
What do you think about the following heuristic for labeling:
.
, _
, -
many
bins are selected for label names1
bins (common for all) can become the titleI wouldn't mind PRing this
Thanks
Hi, thank you for great tool.
Is there any way to filter out high percentiles?
Due to the high value for tail percentiles (99.9, 99.99....), I hardly see normal values. So if I can get a functionality to skip such an extreme case, I think it's more valuable as visualizer.
I'm not familiar with pandas/matplot, but if you give me some hint I will happily change it on my own.
Thanks :)
My input data does not have a percentile at exactly 0.5. It was at 0.52 for some reasons.
Traceback (most recent call last):
File ".venv/bin/hdr-plot", line 18, in <module>
plot.main()
File "/opt/intel/flexran/dpdk/vmwaretools/.venv/lib/python3.7/site-packages/hdr_plot/hdr_plot.py", line 110, in main
plot_summarybox(ax, pct_data, labels)
File "/opt/intel/flexran/dpdk/vmwaretools/.venv/lib/python3.7/site-packages/hdr_plot/hdr_plot.py", line 60, in plot_summarybox
Value Percentile TotalCount 1/(1-Percentile)
0.00 0.000000000000 19 1.00
59.00 0.100000000000 15609 1.11
76.00 0.190000000000 29483 1.23
83.00 0.271000000000 41776 1.37
86.00 0.343900000000 56308 1.52
87.00 0.409510000000 62278 1.69
89.00 0.468559000000 74214 1.88
90.00 0.521703100000 79637 2.09
92.00 0.569532790000 89321 2.32
93.00 0.612579511000 94175 2.58
... (rest of the file)
textstr = '\n'.join([info_text(labels[i], percentiles[i]) for i in range(len(labels))])
File "/opt/intel/flexran/dpdk/vmwaretools/.venv/lib/python3.7/site-packages/hdr_plot/hdr_plot.py", line 60, in <listcomp>
textstr = '\n'.join([info_text(labels[i], percentiles[i]) for i in range(len(labels))])
File "/opt/intel/flexran/dpdk/vmwaretools/.venv/lib/python3.7/site-packages/hdr_plot/hdr_plot.py", line 46, in info_text
"max", data['Latency'].max())
File "/opt/intel/flexran/dpdk/vmwaretools/.venv/lib/python3.7/site-packages/pandas/core/series.py", line 139, in wrapper
raise TypeError(f"cannot convert the series to {converter}")
TypeError: cannot convert the series to <class 'float'>
Offending line is the median calculation:
def info_text(name, data):
textstr = '%-18s\n------------------\n%-6s = %6.2f ms\n%-6s = %6.2f ms\n%-6s = %6.2f ms\n'%(
name,
"min", data['Latency'].min(),
"median", data[data["Percentile"] == 0.5]["Latency"],
"max", data['Latency'].max())
return textstr
I don't know why we're trying to calculate this manually but simply calling the median function fixes the problem.
def info_text(name, data):
textstr = '%-18s\n------------------\n%-6s = %6.2f ms\n%-6s = %6.2f ms\n%-6s
= %6.2f ms\n'%(
name,
"min", data['Latency'].min(),
"median", data['Latency'].median(),
"max", data['Latency'].max())
return textstr
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.