source: tools/baseline.py @ c6f1f3e

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since c6f1f3e was c6f1f3e, checked in by Thierry Delisle <tdelisle@…>, 5 years ago

Jenkins now also computes various speed-up graphs for performance monitoring

  • Property mode set to 100755
File size: 1.0 KB
Line 
1#!/usr/bin/python3
2
3import sys
4
5import urllib.request
6import re
7import json
8
9if len(sys.argv) != 3 :
10        sys.exit("Expected architecture and file name as arguments")
11
12build_cache = {}
13
14def build(number):
15        if number in build_cache:
16                return build_cache[number]
17
18        url = "https://cforall.uwaterloo.ca/jenkins/job/Cforall/job/master/%s/api/json?" % number
19        f = urllib.request.urlopen(url)
20        j = json.loads(f.read().decode("utf-8"))
21        res = re.search("([^:]+):(x86|x64)", j['description'])
22
23        build_cache.update({number : (res.group(1), res.group(2))})
24        return build_cache[number]
25
26content = {}
27try:
28        with open(sys.argv[2]) as f:
29                f.readline()
30                f.readline()
31
32                for l in f:
33                        data = [d.replace('"', '') for d in l.split(',')]
34                        number = data[2]
35                        _, arch = build(number)
36                        if arch == sys.argv[1]:
37                                if not data[1] in content:
38                                        content.update({data[1] : []})
39
40                                content[data[1]].append(float(data[0]))
41except IOError as e:
42        sys.exit(e.strerror)
43
44print(','.join(content.keys()))
45print(','.join([str(sum(vals) / len(vals)) for vals in content.values()]))
Note: See TracBrowser for help on using the repository browser.