diff options
| author | bd <bdunahu@operationnull.com> | 2025-12-03 01:40:52 -0500 |
|---|---|---|
| committer | bd <bdunahu@operationnull.com> | 2025-12-03 01:40:52 -0500 |
| commit | 0fb3c045bbb011380a31bfabd273722f6513fa22 (patch) | |
| tree | f8b4c4bb86cb782d7856b949978e4c900eafb806 | |
| parent | c0aa037b4e3d7903254ef68e4654c66082c81c68 (diff) | |
html_gen allow showing legend for explicit set of coroutines
| -rw-r--r-- | nemesis/html_gen.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nemesis/html_gen.py b/nemesis/html_gen.py index 2a417fc..85d2e5f 100644 --- a/nemesis/html_gen.py +++ b/nemesis/html_gen.py @@ -53,9 +53,12 @@ def plot_results(results: "collections.defaultdict[str, collections.defaultdict[ shared_yaxes=False, ) + all_coros = set() # used to not add a coro to the legend twice for coro_name, x_values in results.items(): for speedup, xx_values in x_values.items(): for loop, experiments in xx_values.items(): + show_legend = coro_name not in all_coros + all_coros.add(coro_name) col = loop_to_col[loop] x_list = [] @@ -109,7 +112,7 @@ def plot_results(results: "collections.defaultdict[str, collections.defaultdict[ mode='markers', name=coro_name, marker=dict(color=get_color(coro_name)), - showlegend=True, + showlegend=show_legend, ), row=1, col=col) fig.add_trace(go.Scatter( @@ -143,7 +146,7 @@ def plot_results(results: "collections.defaultdict[str, collections.defaultdict[ height=1080, width=1920 * num_loops, title_text=f"Coroutine Performance Metrics: {input_file}", - showlegend=False, + showlegend=True, ) for col in range(1, num_loops + 1): fig.update_xaxes(title_text="speedup (% optimized away)", row=4, col=col) |
