2022-01-22 16:40:31 +01:00
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
|
import pandas as pd
|
|
|
|
|
|
2025-05-05 08:48:42 -07:00
|
|
|
file = sys.argv[1]
|
|
|
|
|
d = pd.read_json(file, orient="index")
|
2022-01-22 16:40:31 +01:00
|
|
|
df = pd.DataFrame(d)
|
|
|
|
|
|
|
|
|
|
df.columns.names = ["date"]
|
|
|
|
|
|
2025-05-05 08:48:42 -07:00
|
|
|
df.index = pd.to_datetime(df.index, utc=True)
|
2022-01-22 16:40:31 +01:00
|
|
|
|
|
|
|
|
print(df)
|
|
|
|
|
|
2025-05-05 08:48:42 -07:00
|
|
|
fig, ax = plt.subplots(figsize=(9.6, 7.2))
|
2022-01-23 10:17:35 +01:00
|
|
|
|
2022-01-22 16:40:31 +01:00
|
|
|
df.plot(y="total", color="blue", ax=ax)
|
2022-01-22 18:06:33 +01:00
|
|
|
df.plot(y="fail", color="gray", ax=ax, dashes=(2, 1))
|
|
|
|
|
df.plot(y="pass", color="green", ax=ax, dashes=(4, 1))
|
2025-05-05 08:48:42 -07:00
|
|
|
if "gnu" in file:
|
2022-01-22 18:06:33 +01:00
|
|
|
df.plot(y="error", color="orange", ax=ax, dashes=(6, 2))
|
2025-05-05 08:48:42 -07:00
|
|
|
fig.autofmt_xdate()
|
|
|
|
|
plt.margins(0.01)
|
|
|
|
|
plt.ylim(ymin=0)
|
|
|
|
|
if "gnu" in file:
|
2024-04-03 16:44:22 +02:00
|
|
|
plt.title("Rust/findutils running GNU testsuite")
|
2025-05-05 08:48:42 -07:00
|
|
|
plt.savefig("gnu-results.svg", format="svg", dpi=199, bbox_inches="tight")
|
2022-01-22 17:55:57 +01:00
|
|
|
else:
|
2024-04-03 16:44:22 +02:00
|
|
|
plt.title("Rust/findutils running BFS testsuite")
|
2025-05-05 08:48:42 -07:00
|
|
|
plt.savefig("bfs-results.svg", format="svg", dpi=199, bbox_inches="tight")
|