diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2016-04-12 09:58:23 -0400 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2016-04-12 09:58:23 -0400 |
commit | 7595e5f951470632ca8fb2389f9125053d11cf92 (patch) | |
tree | 7b278fc29ca60935eda15e69005369c494c9a832 | |
parent | e07e764a11cacfa374de75de7da16be935e5e8f4 (diff) |
add profiler targets
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 9 | ||||
-rwxr-xr-x | server_with_soledad_syncer.py | 2 | ||||
-rw-r--r-- | soledad_sync.py | 5 |
4 files changed, 13 insertions, 4 deletions
@@ -2,3 +2,4 @@ __pycache__ *.pyc *.swp *.swo +*.cprofile @@ -1,7 +1,14 @@ # Actual soledad sync soledad-sync-server: - ./server_with_soledad_syncer.py + twistd -n web --port 8080 --class=server_with_soledad_syncer.resource + +soledad-sync-server-debug: + #twistd --profile=stats_obj --profiler=cProfile -n web --port 8080 --class=server_with_soledad_syncer.resource + python -m cProfile -o sync.cprofile server_with_soledad_syncer.py + +view-profile: + cprofilev -f sync.cprofile measure-ping: httperf --server localhost --port 8080 --num-calls 5 --num-conns 20 --uri /ping diff --git a/server_with_soledad_syncer.py b/server_with_soledad_syncer.py index 0a2fb14..5346df6 100755 --- a/server_with_soledad_syncer.py +++ b/server_with_soledad_syncer.py @@ -1,7 +1,7 @@ #!/usr/bin/env python import os -from klein import run, route +from klein import run, route, resource import soledad_sync as sync diff --git a/soledad_sync.py b/soledad_sync.py index 76b01a9..710ecd5 100644 --- a/soledad_sync.py +++ b/soledad_sync.py @@ -3,10 +3,11 @@ from leap.soledad.client.api import Soledad from twisted.internet import defer # EDIT THIS TO MATCH YOUR TEST ENVIRONMENT ------------- -UUID = 'deadbeef3' +UUID = 'deadbeef4' #HOST = 'http://futeisha:2323' HOST = 'http://localhost:2323' -NUM_DOCS = 100 +#NUM_DOCS = 100 +NUM_DOCS = 5 PAYLOAD = '/tmp/payload' # ------------------------------------------------------ |