From: Mark Wong Date: Sat, 29 Jul 2017 00:51:05 +0000 (-0700) Subject: Capture uname information X-Git-Url: http://git.postgresql.org/gitweb/static/%7B%7Bpgdulink%28?a=commitdiff_plain;h=457432ee25f5336c959b1612e234dd121ca94a34;p=pgperffarm.git Capture uname information It has some things that are not in the sysctl information. Like hardware architecture. --- diff --git a/client/benchmarks/runner.py b/client/benchmarks/runner.py index 80cee21..5686a3c 100644 --- a/client/benchmarks/runner.py +++ b/client/benchmarks/runner.py @@ -1,10 +1,11 @@ import json import os +from multiprocessing import Process, Queue from time import gmtime, strftime +from subprocess import check_output from utils.logging import log -from multiprocessing import Process, Queue class BenchmarkRunner(object): @@ -108,9 +109,14 @@ class BenchmarkRunner(object): # merge data from the collectors into the JSON document with results r.update(self._collector.result()) - r['meta'] = {'benchmark': config['benchmark'], - 'date': strftime("%Y-%m-%d %H:%M:%S.000000+00", gmtime()), - 'name': config_name} + uname = check_output(['uname', '-a']) + + r['meta'] = { + 'benchmark': config['benchmark'], + 'date': strftime("%Y-%m-%d %H:%M:%S.000000+00", gmtime()), + 'name': config_name, + 'uname': uname, + } with open('%s/%s.json' % (self._output, config_name), 'w') as f: f.write(json.dumps(r, indent=4))