.. | .. |
---|
1 | | -#!/usr/bin/python |
---|
| 1 | +#!/usr/bin/env python |
---|
| 2 | +# SPDX-License-Identifier: GPL-2.0-only |
---|
2 | 3 | # -*- coding: utf-8 -*- |
---|
3 | 4 | # |
---|
4 | 5 | """ This utility can be used to debug and tune the performance of the |
---|
.. | .. |
---|
103 | 104 | if os.path.exists(file_name): |
---|
104 | 105 | output_png = "cpu%03d_perf_busy_vs_samples.png" % cpu_index |
---|
105 | 106 | g_plot = common_all_gnuplot_settings(output_png) |
---|
106 | | - g_plot('set yrange [0:40]') |
---|
| 107 | +# autoscale this one, no set y1 range |
---|
107 | 108 | g_plot('set y2range [0:200]') |
---|
108 | 109 | g_plot('set y2tics 0, 10') |
---|
109 | 110 | g_plot('set title "{} : cpu perf busy vs. sample : CPU {:0>3} : {:%F %H:%M}"'.format(testname, cpu_index, datetime.now())) |
---|
.. | .. |
---|
124 | 125 | if os.path.exists(file_name): |
---|
125 | 126 | output_png = "cpu%03d_perf_busy.png" % cpu_index |
---|
126 | 127 | g_plot = common_all_gnuplot_settings(output_png) |
---|
127 | | - g_plot('set yrange [0:40]') |
---|
| 128 | +# autoscale this one, no set y1 range |
---|
128 | 129 | g_plot('set y2range [0:200]') |
---|
129 | 130 | g_plot('set y2tics 0, 10') |
---|
130 | 131 | g_plot('set title "{} : perf busy : CPU {:0>3} : {:%F %H:%M}"'.format(testname, cpu_index, datetime.now())) |
---|
.. | .. |
---|
143 | 144 | if os.path.exists(file_name): |
---|
144 | 145 | output_png = "cpu%03d_durations.png" % cpu_index |
---|
145 | 146 | g_plot = common_all_gnuplot_settings(output_png) |
---|
146 | | -# Should autoscale be used here? Should seconds be used here? |
---|
147 | | - g_plot('set yrange [0:5000]') |
---|
148 | | - g_plot('set ytics 0, 500') |
---|
| 147 | +# autoscale this one, no set y range |
---|
149 | 148 | g_plot('set title "{} : durations : CPU {:0>3} : {:%F %H:%M}"'.format(testname, cpu_index, datetime.now())) |
---|
150 | 149 | g_plot('set ylabel "Timer Duration (MilliSeconds)"') |
---|
151 | 150 | # override common |
---|
.. | .. |
---|
175 | 174 | if os.path.exists('cpu.csv'): |
---|
176 | 175 | output_png = 'all_cpu_pstates_vs_samples.png' |
---|
177 | 176 | g_plot = common_all_gnuplot_settings(output_png) |
---|
178 | | - g_plot('set yrange [0:40]') |
---|
| 177 | +# autoscale this one, no set y range |
---|
179 | 178 | # override common |
---|
180 | 179 | g_plot('set xlabel "Samples"') |
---|
181 | 180 | g_plot('set ylabel "P-State"') |
---|
.. | .. |
---|
190 | 189 | |
---|
191 | 190 | output_png = 'all_cpu_pstates.png' |
---|
192 | 191 | g_plot = common_all_gnuplot_settings(output_png) |
---|
193 | | - g_plot('set yrange [0:40]') |
---|
| 192 | +# autoscale this one, no set y range |
---|
194 | 193 | g_plot('set ylabel "P-State"') |
---|
195 | 194 | g_plot('set title "{} : cpu pstates : {:%F %H:%M}"'.format(testname, datetime.now())) |
---|
196 | 195 | |
---|
.. | .. |
---|
221 | 220 | |
---|
222 | 221 | output_png = 'all_cpu_frequencies.png' |
---|
223 | 222 | g_plot = common_all_gnuplot_settings(output_png) |
---|
224 | | - g_plot('set yrange [0:4]') |
---|
| 223 | +# autoscale this one, no set y range |
---|
225 | 224 | g_plot('set ylabel "CPU Frequency (GHz)"') |
---|
226 | 225 | g_plot('set title "{} : cpu frequencies : {:%F %H:%M}"'.format(testname, datetime.now())) |
---|
227 | 226 | |
---|
.. | .. |
---|
235 | 234 | |
---|
236 | 235 | output_png = 'all_cpu_durations.png' |
---|
237 | 236 | g_plot = common_all_gnuplot_settings(output_png) |
---|
238 | | - g_plot('set yrange [0:5000]') |
---|
239 | | - g_plot('set ytics 0, 500') |
---|
| 237 | +# autoscale this one, no set y range |
---|
240 | 238 | g_plot('set ylabel "Timer Duration (MilliSeconds)"') |
---|
241 | 239 | g_plot('set title "{} : cpu durations : {:%F %H:%M}"'.format(testname, datetime.now())) |
---|
242 | 240 | |
---|