Mercurial > cgi-bin > hgwebdir.cgi > VMS > 2__runs_and_data
comparison scripts/overhead.py @ 4:ef2b8d975a99
exec time vs task size data generation and calculation splited in two scripts
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Mon, 12 Dec 2011 20:26:28 +0100 |
| parents | 75c55af8338f |
| children |
comparison
equal
deleted
inserted
replaced
| 0:30682dd71414 | 1:943997620fae |
|---|---|
| 119 | 119 |
| 120 #take shortest run | 120 #take shortest run |
| 121 results.sort(lambda x,y: cmp(x["total_exe_cycles"],y["total_exe_cycles"])) | 121 results.sort(lambda x,y: cmp(x["total_exe_cycles"],y["total_exe_cycles"])) |
| 122 total_workcycles = results[0]["total_workcycles"] | 122 total_workcycles = results[0]["total_workcycles"] |
| 123 total_exe_cycles = results[0]["total_exe_cycles"] | 123 total_exe_cycles = results[0]["total_exe_cycles"] |
| 124 exeCycles_workCycles_ratio = results[0]["exeCycles_workCycles_ratio"] | 124 #exeCycles_workCycles_ratio = results[0]["exeCycles_workCycles_ratio"] |
| 125 | 125 |
| 126 #Calculate numbers | 126 #Calculate numbers |
| 127 overhead = total_exe_cycles - total_workcycles | 127 overhead = total_exe_cycles - total_workcycles |
| 128 total_syncs = totalThreads * TASKS_PER_THREAD * 2 | 128 total_syncs = totalThreads * TASKS_PER_THREAD * 2 |
| 129 overhead_per_sync = float(overhead) / float(total_syncs) | 129 overhead_per_sync = float(overhead) / float(total_syncs) |
| 130 cycles_of_task = float(total_workcycles) / float(TASKS_PER_THREAD * totalThreads) | 130 cycles_of_task = float(total_workcycles) / float(TASKS_PER_THREAD * totalThreads) |
| 131 overhead_per_core = float(overhead) / NUM_CORES | 131 overhead_per_core = float(overhead) / NUM_CORES |
| 132 workcycles_per_core = total_workcycles / NUM_CORES | 132 workcycles_per_core = total_workcycles / NUM_CORES |
| 133 | |
| 134 exeCycles_workCycles_ratio = float(total_workcycles+float(overhead)/2)/float(total_workcycles) | |
| 133 | 135 |
| 134 gnuplot_output.write("%20d\t%20d\t%20d\t%20f\t%20d\t%20d\t%20f\t%20f\n" % ( | 136 gnuplot_output.write("%20d\t%20d\t%20d\t%20f\t%20d\t%20d\t%20f\t%20f\n" % ( |
| 135 workload_iterations_in_task, | 137 workload_iterations_in_task, |
| 136 total_exe_cycles, | 138 total_exe_cycles, |
| 137 total_workcycles, | 139 total_workcycles, |
