summaryrefslogtreecommitdiff
path: root/scripts/profiling/util.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-08-09 14:02:56 -0400
committerKali Kaneko <kali@leap.se>2015-08-11 15:22:23 -0400
commit79b3b48170aed5d975b8e664eb85b2a99ca578f6 (patch)
tree6c622d191f3408f8c0606c348bebcd34d6aefdaa /scripts/profiling/util.py
parent541cd939aa3bfb8726f2e51d28ab3145059a676d (diff)
[feat] update profile-sync script, add plop profiling
Updating the profile-sync script to the latest deferred-based sync. - Added a couple of options to have finer control about what output to get. - Add support for the plop profiler https://pypi.python.org/pypi/plop/ - To get meaningful plop profiles, make sure to disable the system stats collection, like this:: ./profile-sync.py --no-stats --plop -b /tmp/syncdata/ -p sikret user@provider A good practice for this is having a pre-seeded soledad account (currently you have to do that through the wizard, a cli will be very nice to have in the coming future) with a known amount of data (for instance, sending some mails with known payload weight). It is VERY IMPORTANT that you *NEVER* process the data in this account (ie, do not ever log in with a mail client, for instance, since that will alter the original documents). In order to have comparable results, you should always run this sync script in similar conditions. Ideally, on a machine with runlevel 1. Also, make sure of deleting the contents in the folder if you are not using a temporal dir.
Diffstat (limited to 'scripts/profiling/util.py')
-rw-r--r--scripts/profiling/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/profiling/util.py b/scripts/profiling/util.py
index adf1de8c..e7e2ef9a 100644
--- a/scripts/profiling/util.py
+++ b/scripts/profiling/util.py
@@ -46,7 +46,7 @@ class StatsLogger(threading.Thread):
stats = []
stats.append("%f" % (now - self._start)) # elapsed time
stats.append("%f" % psutil.cpu_percent()) # total cpu
- stats.append("%f" % psutil.phymem_usage().percent) # total memory
+ stats.append("%f" % psutil.virtual_memory().percent) # total memory
return ' '.join(stats)
def _make_proc_stats(self):