Add timer to builders

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-11-26 13:32:50 -05:00
parent 2554e818d1
commit 37dabf1c98

View File

@@ -0,0 +1,14 @@
from __future__ import print_function
import urllib, json
filehandle = urllib.urlopen('http://www.coolprop.dreamhosters.com:8010/json/builders')
jj = json.loads(filehandle.read())
times = []
for key in jj.keys():
filehandle = urllib.urlopen('http://www.coolprop.dreamhosters.com:8010/json/builders/' + key + '/builds/-1')
builder = json.loads(filehandle.read())
elapsed_time = builder['times'][1] - builder['times'][0]
times.append((elapsed_time, key))
print(sorted(times)[::-1])