summaryrefslogtreecommitdiff
path: root/scripts/scalability/test_controller/client/test_Blobs.py
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2017-10-31 16:32:45 -0200
committerdrebs <drebs@riseup.net>2017-11-02 09:36:31 -0200
commit31bdbc7268ff118080ecfb67f716fd86d3421032 (patch)
treef5229cd7a868c00a55d7440a88f604a5ec97596f /scripts/scalability/test_controller/client/test_Blobs.py
parenta7f93cec7999de04614d7adaf91c4348a3313e2e (diff)
[benchmarks] use only one user in scalability tests
Diffstat (limited to 'scripts/scalability/test_controller/client/test_Blobs.py')
-rw-r--r--scripts/scalability/test_controller/client/test_Blobs.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/scalability/test_controller/client/test_Blobs.py b/scripts/scalability/test_controller/client/test_Blobs.py
index 5f31dbc8..1bcfc74e 100644
--- a/scripts/scalability/test_controller/client/test_Blobs.py
+++ b/scripts/scalability/test_controller/client/test_Blobs.py
@@ -37,21 +37,21 @@ def _ensure_template(templates_dir, size):
class Blobs(FunkLoadTestCase):
- next_user_id = 0
+ next_blob_id = 0
lock = threading.Lock()
- def _get_next_user_id(self):
+ def _get_next_blob_id(self):
with Blobs.lock:
- user_id = Blobs.next_user_id
- Blobs.next_user_id += 1
- Blobs.next_user_id %= 5000
- return user_id
+ blob_id = Blobs.next_blob_id
+ Blobs.next_blob_id += 1
+ Blobs.next_blob_id %= 5000
+ return blob_id
def setUp(self):
- user_id = self._get_next_user_id()
+ blob_id = self._get_next_blob_id()
base_url = self.conf_get('main', 'url')
- self.url = urlparse.urljoin(base_url, 'blobs/%s/0' % user_id)
- self.setHeader('Authorization', _get_auth_header(user_id))
+ self.url = urlparse.urljoin(base_url, 'blobs/0/%d' % blob_id)
+ self.setHeader('Authorization', _get_auth_header('0'))
templates_dir = self.conf_get('main', 'templates_dir')
size = self.conf_getInt('main', 'size')
fpath = _ensure_template(templates_dir, size)