diff options
author | drebs <drebs@riseup.net> | 2017-11-02 09:28:56 -0200 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2017-11-02 09:28:56 -0200 |
commit | b36ebc87f449af5ad7a677350a3ccfc7d26cfb1e (patch) | |
tree | 6dd6e7a15ace7f7e15815546f43d333f74101050 /scripts/measure_perf_series.py | |
parent | 01e2a72ce30f0fbb4a027d3246a8ba16e00ae197 (diff) |
move client responsiveness tests to a subfolder
Diffstat (limited to 'scripts/measure_perf_series.py')
-rwxr-xr-x | scripts/measure_perf_series.py | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/scripts/measure_perf_series.py b/scripts/measure_perf_series.py deleted file mode 100755 index 587ff7a..0000000 --- a/scripts/measure_perf_series.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python - -import commands -import datetime - -# How many points to measure. Make sure that you leave the baseline -# running for a significative amount before triggering the sync, it's possible -# you have significant variability in there. -POINTS = 400 - -SCALE = 50 - -commands.getoutput('echo time req/s cpu mem sync_phase sync_exchange_phase > ./out/series.log') -start = datetime.datetime.now() - -for i in range(POINTS): - value = commands.getoutput('./scripts/get_ping_rate.py') - print "Step", i, "...", value - stats = commands.getoutput('./scripts/get_client_stats.py') - cpu, mem, sync_phase, sync_exchange_phase = stats.split() - sync_phase = str(int(sync_phase)*SCALE) - sync_exchange_phase = str(int(sync_exchange_phase)*SCALE) - now = datetime.datetime.now() - secs = (now - start).total_seconds() - try: - # make it so the script exits succesfully when the server is dead - commands.getoutput( - 'echo %s\t%s\t%s\t%s\t%s\t%s >> ./out/series.log' \ - % (secs, value, cpu, mem, sync_phase, sync_exchange_phase)) - except ValueError: - break |