-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcharts.py
More file actions
executable file
·58 lines (51 loc) · 1.36 KB
/
charts.py
File metadata and controls
executable file
·58 lines (51 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env python
import plotly.express as px
import numpy as np
import pandas as pd
input_factor = {
"measurements_1M.txt": 1000,
"measurements_10M.txt": 100,
"measurements_100M.txt": 10,
"measurements_1B.txt": 1,
}
df = pd.read_csv('results.csv')
df['projected_mean'] = df.apply(lambda row: row['mean'] * input_factor[row['input']], axis=1)
for i in range(2, len(df) + 1):
fig = px.bar(
df.head(i),
x='command',
y='projected_mean',
# log_y=True,
labels={
"projected_mean": "Time (s)",
},
text_auto=".4r",
)
fig.update_traces(textangle=0, cliponaxis=False, textposition="outside")
fig.update_layout(yaxis_tickformat = ".1r", xaxis_title=None)
fig.write_image(f"fig{i}.svg")
df = pd.read_csv('thermal.csv')
fig = px.line(
df,
y=['amd', 'm2'],
title="010_polars.rb measurements_100M.txt",
labels={
"variable": "CPU",
"index": "Consecutive runs",
"value": "Time (s)"
}
)
fig.update_layout(title_x=0.5, yaxis_range=[0, 2.3], xaxis_range=[0,100])
fig.write_image(f"thermal.svg")
df = pd.read_csv('proc.csv')
fig = px.line(
df,
x='threads',
y='mean',
title="005_parallel_processes.rb measurements_100M.txt",
labels={
"threads": "Number of threads",
"mean": "Time (s)"
}
)
fig.write_image(f"proc.svg")