diff options
| author | bd <bdunahu@operationnull.com> | 2025-10-08 01:27:33 -0400 |
|---|---|---|
| committer | bd <bdunahu@operationnull.com> | 2025-10-08 01:27:33 -0400 |
| commit | 0bd8432b4c6bd3d82c4916e0b6fb173aa7a5ff39 (patch) | |
| tree | 21588af3b7a8e9097836f4250fd136179a4cc3ac /nemesis/html_gen.py | |
| parent | a2b9381f1c93122ff25586e79275a29dbddde790 (diff) | |
switch from sortedlist to heap queue to ensure proper sorting
Diffstat (limited to 'nemesis/html_gen.py')
| -rw-r--r-- | nemesis/html_gen.py | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/nemesis/html_gen.py b/nemesis/html_gen.py index b774da9..841fbbc 100644 --- a/nemesis/html_gen.py +++ b/nemesis/html_gen.py @@ -8,13 +8,14 @@ def get_color(name): return f'hsl({color_index}, 100%, 50%)' def plot_results(results, filename): - fig = make_subplots(rows=3, cols=1) + fig = make_subplots(rows=4, cols=1) for i, (coro_name, x_values) in enumerate(results.items(), start=1): x_list = [] y_latency_list = [] y_throughput_list = [] y_max_latency_list = [] + y_num_callbacks_list = [] for speedup, experiments in x_values.items(): for experiment in experiments: @@ -25,6 +26,7 @@ def plot_results(results, filename): x_list.append(speedup * 100) num_callbacks = len(completed_callbacks) + y_num_callbacks_list.append(num_callbacks) # handle average latency graph if num_callbacks > 0: @@ -69,9 +71,19 @@ def plot_results(results, filename): showlegend=False, ), row=3, col=1) - fig.update_xaxes(title_text="Speedup (% optimized away)", row=3, col=1) - fig.update_yaxes(title_text="Average Handle Latency (seconds)", row=1, col=1) - fig.update_yaxes(title_text="Throughput (callbacks per second)", row=2, col=1) - fig.update_yaxes(title_text="Maximum Handle Latency (seconds)", row=3, col=1) + fig.add_trace(go.Scatter( + x=x_list, + y=y_num_callbacks_list, + mode='markers', + name=coro_name, + marker=dict(color=get_color(coro_name)), + showlegend=False, + ), row=4, col=1) + + fig.update_xaxes(title_text="speedup (% optimized away)", row=4, col=1) + fig.update_yaxes(title_text="average latency (seconds)", row=1, col=1) + fig.update_yaxes(title_text="throughput (handles per second)", row=2, col=1) + fig.update_yaxes(title_text="maximum latency (seconds)", row=3, col=1) + fig.update_yaxes(title_text="# of callbacks", row=4, col=1) fig.write_html(filename) |
