Skip to content

Commit 129ae79

Browse files
authored
Merge pull request #143 from faster-cpython/dont-include-platforms-without-data
Don't include platforms without data in plots
2 parents 0b57cf4 + fd5789a commit 129ae79

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

Diff for: bench_runner/plot.py

+22-20
Original file line numberDiff line numberDiff line change
@@ -241,16 +241,17 @@ def get_comparison_value(ref, r, base):
241241
]
242242
changes = [get_comparison_value(ref, r, base) for r in runner_results]
243243

244-
ax.plot(
245-
dates,
246-
changes,
247-
color=color,
248-
linestyle=style,
249-
marker=marker,
250-
markersize=5,
251-
label=name,
252-
alpha=0.9,
253-
)
244+
if any(x is not None for x in changes):
245+
ax.plot(
246+
dates,
247+
changes,
248+
color=color,
249+
linestyle=style,
250+
marker=marker,
251+
markersize=5,
252+
label=name,
253+
alpha=0.9,
254+
)
254255

255256
if runner_i > 0:
256257
continue
@@ -359,16 +360,17 @@ def get_comparison_value(ref, r):
359360
dates = [datetime.datetime.fromisoformat(x[0]) for x in line]
360361
changes = [x[1] for x in line]
361362

362-
ax.plot(
363-
dates,
364-
changes,
365-
color=color,
366-
linestyle=style,
367-
marker=marker,
368-
markersize=5,
369-
label=name,
370-
alpha=0.9,
371-
)
363+
if any(x is not None for x in changes):
364+
ax.plot(
365+
dates,
366+
changes,
367+
color=color,
368+
linestyle=style,
369+
marker=marker,
370+
markersize=5,
371+
label=name,
372+
alpha=0.9,
373+
)
372374

373375
annotate_y_axis(ax, differences)
374376

0 commit comments

Comments
 (0)