More testing
This commit is contained in:
parent
6d6c3b82fd
commit
d4a7862a14
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
for f in {1..10};
|
||||
for f in {1..100};
|
||||
do
|
||||
data="{\"username\":\"testuser${f}\",\"email\":\"testuser${f}@kolaente.de\",\"password\":\"1234\"}"
|
||||
#echo $data
|
||||
|
@ -20,14 +20,14 @@ class VikunjaTaskSet(TaskSequence):
|
||||
self.namespaces = {}
|
||||
|
||||
def get_authentication_keys(self):
|
||||
response = self.client.post("/login", {"username":"testuser1", "password":"1234"})
|
||||
response = self.client.post("/login", {"username":"testuser" + str(random.randint(1, 100)), "password":"1234"})
|
||||
data = json.loads(response.text)
|
||||
self.headers["Authorization"] = 'Bearer ' + data["token"]
|
||||
|
||||
@task
|
||||
@seq_task(1)
|
||||
def dashboard(self):
|
||||
self.client.get("/tasks", headers=self.headers)
|
||||
self.client.get("/tasks/all", headers=self.headers)
|
||||
response = self.client.get("/namespaces", headers=self.headers)
|
||||
self.namespaces = json.loads(response.text)
|
||||
|
||||
@ -40,16 +40,22 @@ class VikunjaTaskSet(TaskSequence):
|
||||
data = json.loads(response.text)
|
||||
self.listIDs.append(data["id"])
|
||||
|
||||
@seq_task
|
||||
@task(1000)
|
||||
@seq_task(3)
|
||||
@task(500)
|
||||
def add_task(self):
|
||||
self.client.put("/lists/" + str(random.choice(self.listIDs)),
|
||||
data=json.dumps({"text": "task created by locust"}),
|
||||
headers=self.headers)
|
||||
|
||||
@seq_task(4)
|
||||
@task(2000)
|
||||
def get_list(self):
|
||||
self.client.get("/lists/" + str(random.choice(self.listIDs)),
|
||||
headers=self.headers)
|
||||
|
||||
|
||||
|
||||
class VikunjaLocust(HttpLocust):
|
||||
task_set = VikunjaTaskSet
|
||||
min_wait = 100
|
||||
max_wait = 5000
|
||||
max_wait = 1500
|
||||
|
BIN
results/1st_mariadb_redis_500users.png
Normal file
BIN
results/1st_mariadb_redis_500users.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
BIN
results/2_mariadb_redis_100users.png
Normal file
BIN
results/2_mariadb_redis_100users.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
1071
results/2_mariadb_redis_100users_distribution_1544398400.8947906.csv
Normal file
1071
results/2_mariadb_redis_100users_distribution_1544398400.8947906.csv
Normal file
File diff suppressed because it is too large
Load Diff
1071
results/2_mariadb_redis_100users_requests_1544398396.8018072.csv
Normal file
1071
results/2_mariadb_redis_100users_requests_1544398396.8018072.csv
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user