Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Latency graphs: Do not hardcode x range
[csit.git]
/
resources
/
tools
/
presentation
/
generator_plots.py
diff --git
a/resources/tools/presentation/generator_plots.py
b/resources/tools/presentation/generator_plots.py
index
650a51c
..
4ceeebc
100644
(file)
--- a/
resources/tools/presentation/generator_plots.py
+++ b/
resources/tools/presentation/generator_plots.py
@@
-62,7
+62,8
@@
COLORS = (
REGEX_NIC = re.compile(r'(\d*ge\dp\d\D*\d*[a-z]*)-')
# This value depends on latency stream rate (9001 pps) and duration (5s).
REGEX_NIC = re.compile(r'(\d*ge\dp\d\D*\d*[a-z]*)-')
# This value depends on latency stream rate (9001 pps) and duration (5s).
-PERCENTILE_MAX = 99.9999
+# Keep it slightly higher to ensure rounding errors to not remove tick mark.
+PERCENTILE_MAX = 99.999501
def generate_plots(spec, data):
def generate_plots(spec, data):
@@
-398,9
+399,8
@@
def plot_hdrh_lat_by_percentile_x_log(plot, input_data):
)
layout[u"title"][u"text"] = f"<b>Latency:</b> {name}"
)
layout[u"title"][u"text"] = f"<b>Latency:</b> {name}"
- layout[u"xaxis"][u"range"] = [
- 0, round(log(100.0 / (100.0 - PERCENTILE_MAX), 10))
- ]
+ x_max = log(100.0 / (100.0 - PERCENTILE_MAX), 10)
+ layout[u"xaxis"][u"range"] = [0, x_max]
fig.update_layout(layout)
# Create plot
fig.update_layout(layout)
# Create plot