10 re_date = re.compile('^Date: (.*)')
11 re_testing = re.compile('^(\([0-9]+\) (# )?)?\s*Testing "(.*)" in (.*):\s*$')
12 re_commit = re.compile('.*(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}).*, commit: (.*)')
13 re_commithash = re.compile('([0-9a-f]{7})(-dirty)? \(')
14 re_check = re.compile('^(\([0-9]+\) (# )?)?!\s*(.*?)\s+(\S+)\s*$')
15 re_perf = re.compile('^(\([0-9]+\) (# )?)?!\s*(.*?)\s+PERF:\s*(.*?)\s+(\S+)\s*$')
18 date = time.localtime(time.time())
34 match = re.match(line)
37 for line in sys.stdin:
44 date = time.strptime(match.group(1), "%a, %d %b %Y %H:%M:%S +0200")
45 elif matches(re_testing):
48 where = match.group(4)
50 match = re_commit.match(what)
53 date = time.strptime(match.group(1), "%Y-%m-%d %H:%M:%S")
54 commit = match.group(2)
55 match = re_commithash.search(commit);
57 commithash = match.group(1)
61 (basename, ext) = os.path.splitext(os.path.basename(where))
62 elif matches(re_perf):
80 if '/vancouver-kernelbuild' in where:
81 if linetype == 'testing':
82 m = re.compile('vancouver-kernelbuild-(.*).wv').search(where)
83 if m: tag = m.group(1)
84 else: tag = 'ept-vpid'
86 line='Testing "Kernel compile in ramdisk" in kernelbuild-ramdisk:'
87 if linetype == 'perf':
88 line = line.replace('kbuild', "vm-"+tag);
89 line = line.replace('ok', 'axis="kbuild" ok');
90 if '/kernelbuild-bare-metal.wv' in where:
91 if linetype == 'testing':
92 line='Testing "Kernel compile in ramdisk" in kernelbuild-ramdisk:'
93 if linetype == 'perf':
94 line = line.replace('kbuild', 'bare-metal');
95 line = line.replace('ok', 'axis="kbuild" ok');
97 if '/diskbench-vm.wv' in where and linetype == 'perf' and commithash == '7459b8c':
98 # Skip results of test with forgotten debugging output
101 if 'standalone/basicperf.c' in where and linetype == 'perf' and "PERF: warmup_" in line:
102 # Skip warmup results
105 if 'vancouver-linux-basic' in where:
106 continue # Ignore the old test
108 if 'diskbench-ramdisk.wv' in where or 'diskbench-ramdisk-old.wv' in where:
109 # Merge graphs for old and new disk protocol
110 if linetype == 'testing' and 'diskbench-ramdisk-old.wv' in where:
111 line = line.replace('diskbench-ramdisk-old.wv', 'diskbench-ramdisk.wv');
112 if linetype == 'perf' and key == 'request_rate':
113 continue # Do not plot request rate
114 if linetype == 'perf' and key == 'throughput' and units:
115 line = line.replace('ok', 'axis="throughput" ok');
116 if 'diskbench-ramdisk-old.wv' in where:
117 line = line.replace('throughput', 'old-protocol', 1)
119 if 'parentperf.' in where or 'parentperfsmp.' in where:
120 if linetype == 'testing':
121 if 'parentperf.wv' in where: smp = False
122 elif 'parentperfsmp.wv' in where: smp = True
123 if what == 'Service without sessions': tag = 'nosess'
124 elif what == 'Service with sessions': tag = 'sess'
125 elif what == 'Service with sessions (implemented as a subclass of SService)': tag = 'sserv'
126 elif what == 'Service with sessions represented by portals (implemented as a subclass of NoXlateSService)': tag = 'noxsserv'
128 elif linetype == 'perf':
129 if key == 'min' or key == 'max': continue
130 if key == 'open_session':
131 if 'pre-vnet-removal-239-g910c152' in commit or 'pre-vnet-removal-240-g9b2fa79' in commit: continue # Broken measurements
132 if not smp: print 'Testing "Parent protocol open_session performance" in parentperf_open:'
135 if not smp: print 'Testing "Parent protocol call performance" in parentperf_call:'
136 else: print 'Testing "Parent protocol call performance (4 CPUs in parallel)" in parentperf_call_smp:'
137 line = line.replace(key, tag+'_'+key);
141 if 'loc.wv' in where:
142 if linetype == 'testing' and 'PASSIVE' in what: line = line.replace('loc.wv', 'loc-passive.wv');
143 if linetype == 'perf' and key != 'files':
144 line = line.replace('ok', 'axis="lines" ok');
146 if 'pingpong.wv' in where:
147 if linetype == 'perf':
148 if 'min' in key or 'max' in key: continue
150 if 'vancouver-boottime.wv' in where and linetype == 'perf' and key == 'tsc':
151 line = "! PERF: boottime %f s ok" % (val/2.66e9)
152 #print >>sys.stderr, line
154 # Output (possibly modified) line
158 # compile-command: "make perf"