diff options
author | Mark Wong | 2017-07-28 00:06:06 +0000 |
---|---|---|
committer | Mark Wong | 2018-01-05 19:36:20 +0000 |
commit | 93a4bef0f6e7d19174ee6860626bf9c9afce239e (patch) | |
tree | a9afb70b629fc4b6fe4cd127abfbfc89907d0556 /client/utils/cluster.py | |
parent | 912fa3cc5ccc599a6f8f90ae429f91e828e559a2 (diff) |
Stop storing log files as json
Keep the json results document small by saving log information
externally. This include:
* postgres log
* pgbench output
* sar output
Diffstat (limited to 'client/utils/cluster.py')
-rw-r--r-- | client/utils/cluster.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/utils/cluster.py b/client/utils/cluster.py index 81bca89..0efdb8b 100644 --- a/client/utils/cluster.py +++ b/client/utils/cluster.py @@ -11,7 +11,8 @@ from utils.logging import log class PgCluster(object): 'basic manipulation of postgres cluster (init, start, stop, destroy)' - def __init__(self, bin_path, data_path): + def __init__(self, outdir, bin_path, data_path): + self._outdir = outdir self._bin = bin_path self._data = data_path @@ -61,7 +62,8 @@ class PgCluster(object): with TemporaryFile() as strout: log("starting cluster in '%s' using '%s' binaries" % (self._data, self._bin)) - cmd = ['pg_ctl', '-D', self._data, '-l', 'pg.log', '-w'] + cmd = ['pg_ctl', '-D', self._data, '-l', + ''.join([self._outdir, '/pg.log']), '-w'] if len(self._options) > 0: cmd.extend(['-o', self._options]) cmd.append('start') |