Exemplo n.º 1
0
with con:
    cur = con.cursor()
    plot_xlabel = "benchmarks solved"
    plot_ylabel = "cummulative time"

    gnuplot_command = cStringIO.StringIO()

    data_file = open(data_file_name, 'w')
    util.setupPlot(gnuplot_command, plot_xlabel, plot_ylabel, "")
    util.setupCanvasPlot(gnuplot_command, "gnuplot_canvas")
    util.setupCactusPlot(gnuplot_command)

    util.startPlot(gnuplot_command)
    
    for i in range(len(job_ids)) :
        job_id = job_ids[i]
        result_i = util.getSortedResults(cur, job_id)
        util.dumpCactusToFile(data_file, util.getJobName(cur, job_id), result_i)

    for i in range(len(job_ids)) :
        util.plotOneCactus(gnuplot_command, data_file_name, i, 1, 2)
        if ( i < len(job_ids) - 1) :
            util.plotSeparator(gnuplot_command)

    data_file.close()
    val =  gnuplot_command.getvalue()
    print val
                       
con.close()
Exemplo n.º 2
0
    base_name = path + generateCactusBaseName(job_ids)

    gnuplot_file_name = base_name + ".gnuplot"
    gnuplot_file = open(gnuplot_file_name, 'w')

    data_file_name = base_name + ".dat"
    data_file = open(data_file_name, 'w')
    
    pdf_file_name = base_name + ".pdf"

    util.setupPlot(gnuplot_file, plot_xlabel, plot_ylabel, "")
    util.setupPdfPlot(gnuplot_file, pdf_file_name)
    util.setupCactusPlot(gnuplot_file)

    util.startPlot(gnuplot_file)
    
    for i in range(len(job_ids)) :
        job_id = job_ids[i]
        result_i = util.getSortedResults(cur, job_id)
        util.dumpCactusToFile(data_file, util.getJobName(cur, job_id), result_i)

    for i in range(len(job_ids)) :
        util.plotOneCactus(gnuplot_file, data_file_name, i, 1, 2)
        if ( i < len(job_ids) - 1) :
            util.plotSeparator(gnuplot_file)

    data_file.close()    
    gnuplot_file.close()
                       
con.close()