def one_bench_data(f): assert os.path.exists(f) #print mb heap_size = hintgc_format.get_column(f, hintgc_format.heap_size) heap_size = [int(x) for x in heap_size] #print heap_size # they're only _mostly_ equal - fragementation (FIXME) #assert_all_equal(heap_size) size_map = { 33398784.0 : "31.8 MB", 24899584.0 : "23.7 MB", 92938240.0 : "88.6 MB", 193601536.0 : "184.6 MB", 59383808.0 : "56.6 MB", 780804096.0 : "744.6 MB", 27119616.0 : "25.9 MB", 29339648.0 : "28 MB" } heap_size = size_map[numpy.mean(heap_size)] def gc_flag(row): return int(row[5]) flags = hintgc_format.get_column_pf(f, gc_flag) assert_all_equal(flags); assert flags[0] == 0 flags = hintgc_format.get_column_gc(f, gc_flag) assert_all_equal(flags); assert flags[0] == 1 pfruntime = hintgc_format.get_column_pf(f, hintgc_format.runtime) pfruntime = [int(x) for x in pfruntime] gcruntime = hintgc_format.get_column_gc(f, hintgc_format.runtime) gcruntime = [int(x) for x in gcruntime] #print pfruntime #print gcruntime gc = numpy.mean(gcruntime) pf = numpy.mean(pfruntime) return [gc, pf, heap_size]
f = input_location basename = sys.argv[2] #print mb heap_size = hintgc_format.get_column_pf(f, hintgc_format.heap_size) heap_size = [int(x) for x in heap_size] #interwoven data def gc_flag(row): return int(row[5]) flags = hintgc_format.get_column_pf(f, gc_flag) assert_all_equal(flags); assert flags[0] == 0 flags = hintgc_format.get_column_gc(f, gc_flag) assert_all_equal(flags); assert flags[0] == 1 scratch = hintgc_format.get_column_pf(f, hintgc_format.percent_pf) scratch = [float(x) for x in scratch] frac = scratch def bucket_to_match(x): if x < 0.5: return 0 elif x < 3: return 1 elif x < 7.5: return 5 elif x < 17.5: return 10;
#print heap_size # they're only _mostly_ equal - fragementation (FIXME) #assert_all_equal(heap_size) size_map = { 33398784.0 : "31.8 MB", 24899584.0 : "23.7 MB", 92938240.0 : "88.6 MB", 193601536.0 : "184.6 MB", 59383808.0 : "56.6 MB", 780804096.0 : "744.6 MB", 27119616.0 : "25.9 MB", 29339648.0 : "28 MB" } heap_size = size_map[numpy.mean(heap_size)] def gc_flag(row): return int(row[5]) flags = hintgc_format.get_column_pf(f, gc_flag) assert_all_equal(flags); assert flags[0] == 0 flags = hintgc_format.get_column_gc(f, gc_flag) assert_all_equal(flags); assert flags[0] == 1 pfruntime = hintgc_format.get_column_pf(f, hintgc_format.runtime) pfruntime = [int(x) for x in pfruntime] gcruntime = hintgc_format.get_column_gc(f, hintgc_format.runtime) gcruntime = [int(x) for x in gcruntime] #print pfruntime #print gcruntime gc = numpy.mean(gcruntime) pf = numpy.mean(pfruntime) speedup = "n/a" if pf != 0: speedup = gc/pf