From 86e3c6d468e1f996ce6a1717c395d8f637c342c6 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Sun, 10 May 2020 08:34:23 -0700 Subject: Add simple script to populate server during transition period --- tools/populate.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 tools/populate.py 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())) + -- cgit v1.2.3