summaryrefslogtreecommitdiff
path: root/scripts/create_payload.py
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2017-11-02 09:28:56 -0200
committerdrebs <drebs@riseup.net>2017-11-02 09:28:56 -0200
commitb36ebc87f449af5ad7a677350a3ccfc7d26cfb1e (patch)
tree6dd6e7a15ace7f7e15815546f43d333f74101050 /scripts/create_payload.py
parent01e2a72ce30f0fbb4a027d3246a8ba16e00ae197 (diff)
move client responsiveness tests to a subfolder
Diffstat (limited to 'scripts/create_payload.py')
-rwxr-xr-xscripts/create_payload.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/scripts/create_payload.py b/scripts/create_payload.py
deleted file mode 100755
index d051661..0000000
--- a/scripts/create_payload.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Create a payload file in disk to use during tests. Reads the name of the file
-and the intended size of the payload from the "defaults.conf" file:
-
- PAYLOAD = /path/to/payload/file
- PAYLOAD_SIZE = 500 # in Kb
-"""
-
-import os
-from ConfigParser import ConfigParser
-
-parser = ConfigParser()
-parser.read('defaults.conf')
-
-PAYLOAD = parser.get('sync', 'payload')
-PAYLOAD_SIZE = int(parser.get('sync', 'payload_size')) * 1024
-
-if os.path.isfile(PAYLOAD):
- os.unlink(PAYLOAD)
-
-content = 'a' * 1024
-
-with open(PAYLOAD, 'w') as f:
- length = 0
- while length < PAYLOAD_SIZE:
- f.write(content)
- length += len(content)