Example #1
0
def plot_all_cpu_des_perf():
    """ Plot all cpu desired perf """

    output_png = 'all_cpu_des_perf.png'
    g_plot = ipt.common_gnuplot_settings()
    g_plot('set output "' + output_png + '"')
    g_plot('set ylabel "des perf"')
    g_plot('set title "{} : cpu des perf : {:%F %H:%M}"'.format(
        test_name, datetime.now()))

    title_list = subprocess.check_output('ls cpu???.csv | sed -e \'s/.csv//\'',
                                         shell=True).decode('utf-8').replace(
                                             '\n', ' ')
    plot_str = "plot for [i in title_list] i.'.csv' using {:d}:{:d} pt 255 ps 1 title i".format(
        C_ELAPSED, C_DES_PERF)
    g_plot('title_list = "{}"'.format(title_list))
    g_plot(plot_str)
Example #2
0
def plot_all_cpu_frequency():
    """ Plot all cpu frequencies """

    output_png = 'all_cpu_frequencies.png'
    g_plot = ipt.common_gnuplot_settings()
    g_plot('set output "' + output_png + '"')
    g_plot('set ylabel "CPU Frequency (GHz)"')
    g_plot('set title "{} : cpu frequencies : {:%F %H:%M}"'.format(
        test_name, datetime.now()))

    title_list = subprocess.check_output('ls cpu???.csv | sed -e \'s/.csv//\'',
                                         shell=True).decode('utf-8').replace(
                                             '\n', ' ')
    plot_str = "plot for [i in title_list] i.'.csv' using {:d}:{:d} pt 7 ps 1 title i".format(
        C_ELAPSED, C_FREQ)
    g_plot('title_list = "{}"'.format(title_list))
    g_plot(plot_str)
Example #3
0
def plot_per_cpu_des_perf(cpu_index):
    """ Plot per cpu desired perf """

    file_name = 'cpu{:0>3}.csv'.format(cpu_index)
    if os.path.exists(file_name):
        output_png = "cpu%03d_des_perf.png" % cpu_index
        g_plot = ipt.common_gnuplot_settings()
        g_plot('set output "' + output_png + '"')
        g_plot('set yrange [0:255]')
        g_plot('set ylabel "des perf"')
        g_plot(
            'set title "{} : cpu des perf : CPU {:0>3} : {:%F %H:%M}"'.format(
                test_name, cpu_index, datetime.now()))
        g_plot('set key off')
        ipt.set_4_plot_linestyles(g_plot)
        g_plot('plot "' + file_name +
               '" using {:d}:{:d} with linespoints linestyle 1 axis x1y1'.
               format(C_ELAPSED, C_DES_PERF))
Example #4
0
def plot_all_cpu_load():
    """ Plot all cpu load  """

    output_png = 'all_cpu_load.png'
    g_plot = ipt.common_gnuplot_settings()
    g_plot('set output "' + output_png + '"')
    g_plot('set yrange [0:100]')
    g_plot('set ylabel "CPU load (percent)"')
    g_plot('set title "{} : cpu load : {:%F %H:%M}"'.format(
        test_name, datetime.now()))

    title_list = subprocess.check_output('ls cpu???.csv | sed -e \'s/.csv//\'',
                                         shell=True).decode('utf-8').replace(
                                             '\n', ' ')
    plot_str = "plot for [i in title_list] i.'.csv' using {:d}:{:d} pt 255 ps 1 title i".format(
        C_ELAPSED, C_LOAD)
    g_plot('title_list = "{}"'.format(title_list))
    g_plot(plot_str)
Example #5
0
def plot_per_cpu_load(cpu_index):
    """ Plot per cpu load """

    file_name = 'cpu{:0>3}.csv'.format(cpu_index)
    if os.path.exists(file_name):
        output_png = "cpu%03d_load.png" % cpu_index
        g_plot = ipt.common_gnuplot_settings()
        g_plot('set output "' + output_png + '"')
        g_plot('set yrange [0:100]')
        g_plot('set ytics 0, 10')
        g_plot('set ylabel "CPU load (percent)"')
        g_plot('set title "{} : cpu load : CPU {:0>3} : {:%F %H:%M}"'.format(
            test_name, cpu_index, datetime.now()))
        g_plot('set key off')
        ipt.set_4_plot_linestyles(g_plot)
        g_plot('plot "' + file_name +
               '" using {:d}:{:d} with linespoints linestyle 1 axis x1y1'.
               format(C_ELAPSED, C_LOAD))
Example #6
0
def plot_per_cpu_freq(cpu_index):
    """ Plot per cpu frequency """

    file_name = 'cpu{:0>3}.csv'.format(cpu_index)
    if os.path.exists(file_name):
        output_png = "cpu%03d_frequency.png" % cpu_index
        g_plot = ipt.common_gnuplot_settings()
        g_plot('set output "' + output_png + '"')
        g_plot('set yrange [0:7]')
        g_plot('set ytics 0, 1')
        g_plot('set ylabel "CPU Frequency (GHz)"')
        g_plot('set title "{} : frequency : CPU {:0>3} : {:%F %H:%M}"'.format(
            test_name, cpu_index, datetime.now()))
        g_plot('set ylabel "CPU frequency"')
        g_plot('set key off')
        ipt.set_4_plot_linestyles(g_plot)
        g_plot('plot "' + file_name +
               '" using {:d}:{:d} with linespoints linestyle 1 axis x1y1'.
               format(C_ELAPSED, C_FREQ))