11
11
and generates performance plots.
12
12
13
13
Prerequisites:
14
- Python version 2.7.x
14
+ Python version 2.7.x or higher
15
15
gnuplot 5.0 or higher
16
- gnuplot-py 1.8
16
+ gnuplot-py 1.8 or higher
17
17
(Most of the distributions have these required packages. They may be called
18
- gnuplot-py, phython-gnuplot. )
18
+ gnuplot-py, phython-gnuplot or phython3-gnuplot, gnuplot-nox, .. . )
19
19
20
20
HWP (Hardware P-States are disabled)
21
21
Kernel config for Linux trace is enabled
@@ -181,7 +181,7 @@ def plot_pstate_cpu_with_sample():
181
181
g_plot ('set xlabel "Samples"' )
182
182
g_plot ('set ylabel "P-State"' )
183
183
g_plot ('set title "{} : cpu pstate vs. sample : {:%F %H:%M}"' .format (testname , datetime .now ()))
184
- title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).replace ('\n ' , ' ' )
184
+ title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).decode ( 'utf-8' ). replace ('\n ' , ' ' )
185
185
plot_str = "plot for [i in title_list] i.'.csv' using {:d}:{:d} pt 7 ps 1 title i" .format (C_SAMPLE , C_TO )
186
186
g_plot ('title_list = "{}"' .format (title_list ))
187
187
g_plot (plot_str )
@@ -198,7 +198,7 @@ def plot_pstate_cpu():
198
198
# the following command is really cool, but doesn't work with the CPU masking option because it aborts on the first missing file.
199
199
# plot_str = 'plot for [i=0:*] file=sprintf("cpu%03d.csv",i) title_s=sprintf("cpu%03d",i) file using 16:7 pt 7 ps 1 title title_s'
200
200
#
201
- title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).replace ('\n ' , ' ' )
201
+ title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).decode ( 'utf-8' ). replace ('\n ' , ' ' )
202
202
plot_str = "plot for [i in title_list] i.'.csv' using {:d}:{:d} pt 7 ps 1 title i" .format (C_ELAPSED , C_TO )
203
203
g_plot ('title_list = "{}"' .format (title_list ))
204
204
g_plot (plot_str )
@@ -212,7 +212,7 @@ def plot_load_cpu():
212
212
g_plot ('set ylabel "CPU load (percent)"' )
213
213
g_plot ('set title "{} : cpu loads : {:%F %H:%M}"' .format (testname , datetime .now ()))
214
214
215
- title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).replace ('\n ' , ' ' )
215
+ title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).decode ( 'utf-8' ). replace ('\n ' , ' ' )
216
216
plot_str = "plot for [i in title_list] i.'.csv' using {:d}:{:d} pt 7 ps 1 title i" .format (C_ELAPSED , C_LOAD )
217
217
g_plot ('title_list = "{}"' .format (title_list ))
218
218
g_plot (plot_str )
@@ -226,7 +226,7 @@ def plot_frequency_cpu():
226
226
g_plot ('set ylabel "CPU Frequency (GHz)"' )
227
227
g_plot ('set title "{} : cpu frequencies : {:%F %H:%M}"' .format (testname , datetime .now ()))
228
228
229
- title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).replace ('\n ' , ' ' )
229
+ title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).decode ( 'utf-8' ). replace ('\n ' , ' ' )
230
230
plot_str = "plot for [i in title_list] i.'.csv' using {:d}:{:d} pt 7 ps 1 title i" .format (C_ELAPSED , C_FREQ )
231
231
g_plot ('title_list = "{}"' .format (title_list ))
232
232
g_plot (plot_str )
@@ -241,7 +241,7 @@ def plot_duration_cpu():
241
241
g_plot ('set ylabel "Timer Duration (MilliSeconds)"' )
242
242
g_plot ('set title "{} : cpu durations : {:%F %H:%M}"' .format (testname , datetime .now ()))
243
243
244
- title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).replace ('\n ' , ' ' )
244
+ title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).decode ( 'utf-8' ). replace ('\n ' , ' ' )
245
245
plot_str = "plot for [i in title_list] i.'.csv' using {:d}:{:d} pt 7 ps 1 title i" .format (C_ELAPSED , C_DURATION )
246
246
g_plot ('title_list = "{}"' .format (title_list ))
247
247
g_plot (plot_str )
@@ -255,7 +255,7 @@ def plot_scaled_cpu():
255
255
g_plot ('set ylabel "Scaled Busy (Unitless)"' )
256
256
g_plot ('set title "{} : cpu scaled busy : {:%F %H:%M}"' .format (testname , datetime .now ()))
257
257
258
- title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).replace ('\n ' , ' ' )
258
+ title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).decode ( 'utf-8' ). replace ('\n ' , ' ' )
259
259
plot_str = "plot for [i in title_list] i.'.csv' using {:d}:{:d} pt 7 ps 1 title i" .format (C_ELAPSED , C_SCALED )
260
260
g_plot ('title_list = "{}"' .format (title_list ))
261
261
g_plot (plot_str )
@@ -269,7 +269,7 @@ def plot_boost_cpu():
269
269
g_plot ('set ylabel "CPU IO Boost (percent)"' )
270
270
g_plot ('set title "{} : cpu io boost : {:%F %H:%M}"' .format (testname , datetime .now ()))
271
271
272
- title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).replace ('\n ' , ' ' )
272
+ title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).decode ( 'utf-8' ). replace ('\n ' , ' ' )
273
273
plot_str = "plot for [i in title_list] i.'.csv' using {:d}:{:d} pt 7 ps 1 title i" .format (C_ELAPSED , C_BOOST )
274
274
g_plot ('title_list = "{}"' .format (title_list ))
275
275
g_plot (plot_str )
@@ -283,7 +283,7 @@ def plot_ghz_cpu():
283
283
g_plot ('set ylabel "TSC Frequency (GHz)"' )
284
284
g_plot ('set title "{} : cpu TSC Frequencies (Sanity check calculation) : {:%F %H:%M}"' .format (testname , datetime .now ()))
285
285
286
- title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).replace ('\n ' , ' ' )
286
+ title_list = subprocess .check_output ('ls cpu???.csv | sed -e \' s/.csv//\' ' ,shell = True ).decode ( 'utf-8' ). replace ('\n ' , ' ' )
287
287
plot_str = "plot for [i in title_list] i.'.csv' using {:d}:{:d} pt 7 ps 1 title i" .format (C_ELAPSED , C_GHZ )
288
288
g_plot ('title_list = "{}"' .format (title_list ))
289
289
g_plot (plot_str )
0 commit comments