MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / parse_re2_benchlog

Method parse_re2_benchlog

extern/re2/benchlog/benchplot.py:38–59  ·  view source on GitHub ↗

parse the input benchlog and return a dictionary contain bench data

(self, filename)

Source from the content-addressed store, hash-verified

36 os.remove(filename)
37
38 def parse_re2_benchlog(self, filename):
39 """
40 parse the input benchlog and return a dictionary contain bench data
41 """
42
43 benchdata = self.benchdata
44
45 with open(filename) as f:
46
47 for raw in f.readlines():
48
49 data = raw.split('\t')
50
51 if len(data) == 4:
52
53 data = data[0].split('/') + data[1:]
54 data = list(map(str.strip, data))
55
56 if not benchdata.get(data[0]):
57 benchdata[data[0]] = [ data[1:] ]
58 else:
59 benchdata[data[0]].append(data[1:])
60
61 def gen_csv(self):
62 """

Callers 1

benchplot.pyFile · 0.80

Calls 6

openFunction · 0.50
listClass · 0.50
mapFunction · 0.50
splitMethod · 0.45
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected