Commit 640db1a0 authored by Florian Fischer's avatar Florian Fischer
Browse files

use 99.9 instead of 99.999 percentile

I expect the 99.999 percentile mostly to include extreme latencies
introduced by the experiment setup.
Nearly all flavors show some latencies around ~13500 and ~26000 ms.
parent c0451308
...@@ -15,7 +15,7 @@ CSV_FIELDS = {'total': 0, 'after-send': 1, 'after-send-dispatch': 2} ...@@ -15,7 +15,7 @@ CSV_FIELDS = {'total': 0, 'after-send': 1, 'after-send-dispatch': 2}
def get_bar_data(latency_files, latency='total', include_raw_data=False): def get_bar_data(latency_files, latency='total', include_raw_data=False):
field = CSV_FIELDS[latency] field = CSV_FIELDS[latency]
prctl = [50, 95, 99, 99.99, 99.999] prctl = [50, 95, 99, 99.9, 99.99]
data = {} data = {}
for latency_file in latency_files: for latency_file in latency_files:
...@@ -29,14 +29,14 @@ def get_bar_data(latency_files, latency='total', include_raw_data=False): ...@@ -29,14 +29,14 @@ def get_bar_data(latency_files, latency='total', include_raw_data=False):
usecols=field)) usecols=field))
mean = np.mean(ns) mean = np.mean(ns)
median, p95, p99, p99_99, p99_999 = np.percentile(ns, prctl) median, p95, p99, p99_9, p99_99 = np.percentile(ns, prctl)
data[impl] = { data[impl] = {
'mean': mean, 'mean': mean,
'median': median, 'median': median,
95: p95, 95: p95,
99: p99, 99: p99,
99.99: p99_99, 99.9: p99_9,
99.999: p99_999 99.99: p99_99
} }
if include_raw_data: if include_raw_data:
...@@ -63,17 +63,18 @@ def plot_tail_latency_bar_tikz(latency_files, latency): ...@@ -63,17 +63,18 @@ def plot_tail_latency_bar_tikz(latency_files, latency):
ylabel={latency in ms}, ylabel={latency in ms},
xlabel={percentiles}, xlabel={percentiles},
cycle list name=barvibrant, cycle list name=barvibrant,
symbolic x coords={50\\%,95\\%,99\\%,99.99\\%,99.999\\%}, symbolic x coords={50\\%,95\\%,99\\%,99.9\\%,99.99\\%},
xtick=data, xtick=data,
nodes near coords, nodes near coords,
nodes near coords align={horizontal}, nodes near coords align={horizontal},
nodes near coords style={rotate=90}, nodes near coords style={rotate=90},
/pgf/number format/.cd,
use comma,
1000 sep={},
] ]
""") """)
addplot = Template( addplot = "\\addplot coordinates {{(50\\%, {p50:.2f}) (95\\%, {p95:.2f}) (99\\%, {p99:.2f}) (99.9\\%, {p99_9:.2f}) (99.99\\%, {p99_99:.2f})}};"
"\\addplot coordinates {(50\\%, $p50) (95\\%, $p95) (99\\%, $p99) (99.99\\%, $p99_99) (99.999\\%, $p99_999)};"
)
tail = Template("""\\legend{$labels} tail = Template("""\\legend{$labels}
\\end{axis} \\end{axis}
...@@ -87,20 +88,20 @@ def plot_tail_latency_bar_tikz(latency_files, latency): ...@@ -87,20 +88,20 @@ def plot_tail_latency_bar_tikz(latency_files, latency):
impl_label = plot_utils.subst_runtime_name(impl) impl_label = plot_utils.subst_runtime_name(impl)
labels += f'{impl_label}, ' labels += f'{impl_label}, '
# convert to ms # convert to ms
p50, p95, p99, p99_99, p99_999 = np.array([ p50, p95, p99, p99_9, p99_99 = np.array([
data['median'], data['median'],
data[95], data[95],
data[99], data[99],
data[99.9],
data[99.99], data[99.99],
data[99.999], ]) / 1000000
]) // 1000000
plots.append( plots.append(
addplot.substitute(p50=p50, addplot.format(p50=p50,
p95=p95, p95=p95,
p99=p99, p99=p99,
p99_99=p99_99, p99_9=p99_9,
p99_999=p99_999)) p99_99=p99_99))
print(preamble.substitute(latency_files=latency_files)) print(preamble.substitute(latency_files=latency_files))
for plot in plots: for plot in plots:
...@@ -181,12 +182,12 @@ def summarize(latency_files, latency): ...@@ -181,12 +182,12 @@ def summarize(latency_files, latency):
data = bar_data[impl] data = bar_data[impl]
latencies = data['latencies'] / 1000000 latencies = data['latencies'] / 1000000
# convert to ms # convert to ms
median, p95, p99, p99_99, p99_999 = np.array([ median, p95, p99, p99_9, p99_99 = np.array([
data['median'], data['median'],
data[95], data[95],
data[99], data[99],
data[99.9],
data[99.99], data[99.99],
data[99.999],
]) / 1000000 ]) / 1000000
name = impl.replace('-io', '').replace('emper-', name = impl.replace('-io', '').replace('emper-',
...@@ -200,8 +201,8 @@ def summarize(latency_files, latency): ...@@ -200,8 +201,8 @@ def summarize(latency_files, latency):
print(f'{name}-median: {median:.2f}') print(f'{name}-median: {median:.2f}')
print(f'{name}-p95: {p95:.2f}') print(f'{name}-p95: {p95:.2f}')
print(f'{name}-p99: {p99:.2f}') print(f'{name}-p99: {p99:.2f}')
print(f'{name}-p99.9: {p99_9:.2f}')
print(f'{name}-p99.99: {p99_99:.2f}') print(f'{name}-p99.99: {p99_99:.2f}')
print(f'{name}-p99.999: {p99_999:.2f}')
bin_edge_candidates = [ bin_edge_candidates = [
data_min, median, 100, 500, 1000, 1750, 2500, 5000, 7500, 10000, data_min, median, 100, 500, 1000, 1750, 2500, 5000, 7500, 10000,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment