Profile graphs
This commit is contained in:
parent
0335dac6d4
commit
a81a01f394
5 changed files with 115 additions and 56 deletions
|
|
@ -45,8 +45,7 @@ def extract_function(data, name):
|
|||
percents += float(match.group(2))
|
||||
return (samples, percents)
|
||||
|
||||
if __name__ == "__main__":
|
||||
filename = sys.argv[1]
|
||||
def extract_from_file(filename):
|
||||
f = open(filename, "r")
|
||||
c = f.read()
|
||||
results = {}
|
||||
|
|
@ -57,5 +56,10 @@ if __name__ == "__main__":
|
|||
results[title] = [0, 0.0]
|
||||
results[title][0] += samples
|
||||
results[title][1] += percents
|
||||
return results
|
||||
|
||||
if __name__ == "__main__":
|
||||
filename = sys.argv[1]
|
||||
results = extract_from_file(filename)
|
||||
for title in results:
|
||||
print(title, results[title])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue