diff options
| -rwxr-xr-x | tools/populate.py | 17 | 
1 files changed, 17 insertions, 0 deletions
| diff --git a/tools/populate.py b/tools/populate.py new file mode 100755 index 00000000..4c9f9440 --- /dev/null +++ b/tools/populate.py @@ -0,0 +1,17 @@ +#!/usr/bin/python + +import requests +import json +import sys + +for benchmark, results in json.load(sys.stdin).items(): +  for result in results: +    print('Populating: %s, %s' % (benchmark, result['MachineId'])) + +    if not result.get('Legacy', True): +      if not 'PointerBits' in result: result['PointerBits'] = 64 + +    r = requests.post('http://localhost:1234/benchmark.json', json={benchmark: result}) +    if not r.ok: +      raise IOError("%s %d (%s)" % (r.reason, r.status_code, r.text.strip())) + | 
