Skip to content

Commit

Permalink
✅ Add performance results for zgw-consumers==0.28.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenbal committed Jan 25, 2024
1 parent 84a2177 commit 16d2a3c
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 1 deletion.
13 changes: 13 additions & 0 deletions performance-tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Performance tests

To run performance tests:
1. Ensure that Open Inwoner is running on port 8000
2. Have Open Inwoner configured to connect with test.openzaak.nl
3. Run the following commands:

```code
cd performance-tests
./tests.sh
```

The results will be stored in `performance-tests/results/`
16 changes: 15 additions & 1 deletion performance-tests/locustfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from urllib.parse import urlencode

from locust import HttpUser, events, task
from pyquery import PyQuery as pq


class OpenInwonerUser(HttpUser):
Expand All @@ -10,6 +11,10 @@ class OpenInwonerUser(HttpUser):
def mijn_aanvragen_list_cached(self):
self.client.get("/mijn-aanvragen/content", headers={"HX-Request": "true"})

@task
def mijn_aanvragen_detail_cached(self):
self.client.get(f"{self.case_link}content", headers={"HX-Request": "true"})

def on_start(self):
params = urlencode(
{
Expand All @@ -34,9 +39,18 @@ def on_start(self):
)

# Ensure uncached call is logged separately
self.client.get(
response = self.client.get(
"/mijn-aanvragen/content?_uncached=true", headers={"HX-Request": "true"}
)
doc = pq(response.content)

self.case_link = pq(
doc.find(".cases__link:not([href^='https://www.maykinmedia'])")[0]
).attr("href")

self.client.get(
f"{self.case_link}content?uncached=true", headers={"HX-Request": "true"}
)


@events.init_command_line_parser.add_listener
Expand Down
1 change: 1 addition & 0 deletions performance-tests/results/331b553d_exceptions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Count,Message,Traceback,Nodes
1 change: 1 addition & 0 deletions performance-tests/results/331b553d_failures.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Method,Name,Error,Occurrences
8 changes: 8 additions & 0 deletions performance-tests/results/331b553d_stats.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Type,Name,Request Count,Failure Count,Median Response Time,Average Response Time,Min Response Time,Max Response Time,Average Content Size,Requests/s,Failures/s,50%,66%,75%,80%,90%,95%,98%,99%,99.9%,99.99%,100%
GET,/digid/idp/inloggen_ww/?acs=http%3A%2F%2Flocalhost%3A8000%2Fdigid%2Facs%2F&next=http%3A%2F%2Flocalhost%3A8000&cancel=http%3A%2F%2Flocalhost%3A8000%2Faccounts%2Flogin%2F,1,0,118.73440300041693,118.73440300041693,118.73440300041693,118.73440300041693,6738.0,0.016998126921107075,0.0,120,120,120,120,120,120,120,120,120,120,120
POST,/digid/idp/inloggen_ww/?acs=http%3A%2F%2Flocalhost%3A8000%2Fdigid%2Facs%2F&next=http%3A%2F%2Flocalhost%3A8000&cancel=http%3A%2F%2Flocalhost%3A8000%2Faccounts%2Flogin%2F,1,0,1976.276933999543,1976.276933999543,1976.276933999543,1976.276933999543,44600.0,0.016998126921107075,0.0,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000
GET,/mijn-aanvragen/21c55ba6-9ea0-4656-b1e0-8eb51f6cc683/status/content,21,0,480.0,491.3570622382048,455.9009780004999,555.5192379997607,9102.0,0.3569606653432486,0.0,480,500,510,510,530,550,560,560,560,560,560
GET,/mijn-aanvragen/21c55ba6-9ea0-4656-b1e0-8eb51f6cc683/status/content?uncached=true,1,0,1517.284825000388,1517.284825000388,1517.284825000388,1517.284825000388,9102.0,0.016998126921107075,0.0,1500,1500,1500,1500,1500,1500,1500,1500,1500,1500,1500
GET,/mijn-aanvragen/content,24,0,600.0,611.5234143332297,558.8081490004697,678.8694429997122,17820.0,0.40795504610656985,0.0,600,610,640,660,670,670,680,680,680,680,680
GET,/mijn-aanvragen/content?_uncached=true,1,0,8173.7291119989095,8173.7291119989095,8173.7291119989095,8173.7291119989095,17895.0,0.016998126921107075,0.0,8200,8200,8200,8200,8200,8200,8200,8200,8200,8200,8200
,Aggregated,49,0,570.0,750.6343984693688,118.73440300041693,8173.7291119989095,14227.69387755102,0.8329082191342467,0.0,570,600,610,630,670,1500,8200,8200,8200,8200,8200
52 changes: 52 additions & 0 deletions performance-tests/results/331b553d_stats_history.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Timestamp,User Count,Type,Name,Requests/s,Failures/s,50%,66%,75%,80%,90%,95%,98%,99%,99.9%,99.99%,100%,Total Request Count,Total Failure Count,Total Median Response Time,Total Average Response Time,Total Min Response Time,Total Max Response Time,Total Average Content Size
1706182963,0,,Aggregated,0.000000,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,0,0,0,0.0,0,0,0
1706182964,1,,Aggregated,0.000000,0.000000,120,120,120,120,120,120,120,120,120,120,120,1,0,118.73440300041693,118.73440300041693,118.73440300041693,118.73440300041693,6738.0
1706182965,1,,Aggregated,0.000000,0.000000,120,120,120,120,120,120,120,120,120,120,120,1,0,118.73440300041693,118.73440300041693,118.73440300041693,118.73440300041693,6738.0
1706182966,1,,Aggregated,0.000000,0.000000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2,0,120.0,1047.50566849998,118.73440300041693,1976.276933999543,25669.0
1706182967,1,,Aggregated,0.000000,0.000000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2,0,120.0,1047.50566849998,118.73440300041693,1976.276933999543,25669.0
1706182968,1,,Aggregated,0.000000,0.000000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2,0,120.0,1047.50566849998,118.73440300041693,1976.276933999543,25669.0
1706182969,1,,Aggregated,0.000000,0.000000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2,0,120.0,1047.50566849998,118.73440300041693,1976.276933999543,25669.0
1706182970,1,,Aggregated,0.000000,0.000000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2,0,120.0,1047.50566849998,118.73440300041693,1976.276933999543,25669.0
1706182971,1,,Aggregated,0.000000,0.000000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2,0,120.0,1047.50566849998,118.73440300041693,1976.276933999543,25669.0
1706182972,1,,Aggregated,0.000000,0.000000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2,0,120.0,1047.50566849998,118.73440300041693,1976.276933999543,25669.0
1706182973,1,,Aggregated,0.000000,0.000000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2,0,120.0,1047.50566849998,118.73440300041693,1976.276933999543,25669.0
1706182974,1,,Aggregated,0.222222,0.000000,2000,2000,8200,8200,8200,8200,8200,8200,8200,8200,8200,3,0,2000.0,3422.9134829996233,118.73440300041693,8173.7291119989095,23077.666666666668
1706182975,1,,Aggregated,0.200000,0.000000,2000,2000,8200,8200,8200,8200,8200,8200,8200,8200,8200,4,0,1500.0,2946.5063184998144,118.73440300041693,8173.7291119989095,19583.75
1706182976,1,,Aggregated,0.200000,0.000000,1500,2000,2000,8200,8200,8200,8200,8200,8200,8200,8200,5,0,1500.0,2492.978943399794,118.73440300041693,8173.7291119989095,19231.0
1706182977,1,,Aggregated,0.200000,0.000000,1500,1500,2000,2000,8200,8200,8200,8200,8200,8200,8200,6,0,680.0,2175.9422969998923,118.73440300041693,8173.7291119989095,18995.833333333332
1706182978,1,,Aggregated,0.300000,0.000000,680,1500,2000,2000,8200,8200,8200,8200,8200,8200,8200,7,0,680.0,1948.9740798570504,118.73440300041693,8173.7291119989095,18827.85714285714
1706182979,1,,Aggregated,0.300000,0.000000,680,1500,2000,2000,8200,8200,8200,8200,8200,8200,8200,8,0,590.0,1772.1765558749212,118.73440300041693,8173.7291119989095,17612.125
1706182980,1,,Aggregated,0.400000,0.000000,660,680,1500,2000,8200,8200,8200,8200,8200,8200,8200,9,0,660.0,1648.4281582219814,118.73440300041693,8173.7291119989095,17635.222222222223
1706182981,1,,Aggregated,0.500000,0.000000,660,680,1500,2000,8200,8200,8200,8200,8200,8200,8200,10,0,590.0,1532.3088326998914,118.73440300041693,8173.7291119989095,16781.9
1706182982,1,,Aggregated,0.600000,0.000000,660,680,1500,1500,2000,8200,8200,8200,8200,8200,8200,11,0,660.0,1452.8608536362628,118.73440300041693,8173.7291119989095,16876.272727272728
1706182983,1,,Aggregated,0.600000,0.000000,660,680,1500,1500,2000,8200,8200,8200,8200,8200,8200,11,0,660.0,1452.8608536362628,118.73440300041693,8173.7291119989095,16876.272727272728
1706182984,1,,Aggregated,0.800000,0.000000,660,660,1500,1500,2000,8200,8200,8200,8200,8200,8200,12,0,590.0,1380.738105583229,118.73440300041693,8173.7291119989095,16954.916666666668
1706182985,1,,Aggregated,0.900000,0.000000,660,670,680,1500,2000,8200,8200,8200,8200,8200,8200,13,0,660.0,1326.3692833844777,118.73440300041693,8173.7291119989095,17021.46153846154
1706182986,1,,Aggregated,0.900000,0.000000,660,670,680,1500,2000,8200,8200,8200,8200,8200,8200,14,0,590.0,1268.122506642742,118.73440300041693,8173.7291119989095,16455.785714285714
1706182987,1,,Aggregated,0.900000,0.000000,590,660,680,1500,2000,8200,8200,8200,8200,8200,8200,15,0,590.0,1220.3045576665318,118.73440300041693,8173.7291119989095,15965.533333333333
1706182988,1,,Aggregated,0.900000,0.000000,590,660,680,680,2000,8200,8200,8200,8200,8200,8200,16,0,590.0,1180.960723249882,118.73440300041693,8173.7291119989095,16081.4375
1706182989,1,,Aggregated,0.900000,0.000000,590,660,670,680,2000,8200,8200,8200,8200,8200,8200,17,0,590.0,1139.682843176321,118.73440300041693,8173.7291119989095,15670.882352941177
1706182990,1,,Aggregated,0.900000,0.000000,590,660,670,680,2000,8200,8200,8200,8200,8200,8200,18,0,590.0,1107.229309555401,118.73440300041693,8173.7291119989095,15305.944444444445
1706182991,1,,Aggregated,0.900000,0.000000,590,660,670,680,2000,8200,8200,8200,8200,8200,8200,19,0,590.0,1075.655893631464,118.73440300041693,8173.7291119989095,14979.421052631578
1706182992,1,,Aggregated,0.900000,0.000000,590,660,670,680,2000,8200,8200,8200,8200,8200,8200,20,0,590.0,1047.004979149915,118.73440300041693,8173.7291119989095,14685.55
1706182993,1,,Aggregated,0.900000,0.000000,590,590,660,670,1500,2000,8200,8200,8200,8200,8200,21,0,590.0,1021.1142797618647,118.73440300041693,8173.7291119989095,14419.666666666666
1706182994,1,,Aggregated,0.900000,0.000000,590,590,660,670,1500,2000,8200,8200,8200,8200,8200,22,0,560.0,997.751321636315,118.73440300041693,8173.7291119989095,14177.954545454546
1706182995,1,,Aggregated,0.900000,0.000000,590,600,660,670,1500,2000,8200,8200,8200,8200,8200,23,0,590.0,980.432380391231,118.73440300041693,8173.7291119989095,14336.304347826086
1706182996,1,,Aggregated,1.000000,0.000000,590,590,660,670,1500,2000,8200,8200,8200,8200,8200,24,0,560.0,959.0387738332234,118.73440300041693,8173.7291119989095,14118.208333333334
1706182997,1,,Aggregated,1.000000,0.000000,590,600,660,670,1500,2000,8200,8200,8200,8200,8200,25,0,590.0,945.8947911998985,118.73440300041693,8173.7291119989095,14266.28
1706182998,1,,Aggregated,1.000000,0.000000,590,600,660,660,1500,2000,8200,8200,8200,8200,8200,26,0,560.0,927.8071678460177,118.73440300041693,8173.7291119989095,14067.653846153846
1706182999,1,,Aggregated,1.000000,0.000000,580,590,660,660,1500,2000,8200,8200,8200,8200,8200,27,0,580.0,914.8843187776947,118.73440300041693,8173.7291119989095,14206.62962962963
1706183000,1,,Aggregated,1.000000,0.000000,580,590,660,660,1500,2000,8200,8200,8200,8200,8200,28,0,570.0,902.6328678927322,118.73440300041693,8173.7291119989095,14335.67857142857
1706183001,1,,Aggregated,1.000000,0.000000,570,590,630,660,1500,2000,8200,8200,8200,8200,8200,29,0,570.0,887.8827091033098,118.73440300041693,8173.7291119989095,14155.206896551725
1706183002,1,,Aggregated,1.000000,0.000000,570,590,630,660,1500,2000,8200,8200,8200,8200,8200,30,0,560.0,876.9135570998818,118.73440300041693,8173.7291119989095,14277.366666666667
1706183003,1,,Aggregated,1.000000,0.000000,570,590,630,660,680,2000,8200,8200,8200,8200,8200,31,0,570.0,868.2060648385935,118.73440300041693,8173.7291119989095,14391.645161290322
1706183004,1,,Aggregated,1.000000,0.000000,570,590,630,660,680,2000,8200,8200,8200,8200,8200,31,0,570.0,868.2060648385935,118.73440300041693,8173.7291119989095,14391.645161290322
1706183005,1,,Aggregated,1.000000,0.000000,580,600,630,660,680,2000,8200,8200,8200,8200,8200,32,0,570.0,860.5554577185899,118.73440300041693,8173.7291119989095,14498.78125
1706183006,1,,Aggregated,1.000000,0.000000,580,590,620,660,680,2000,8200,8200,8200,8200,8200,33,0,580.0,852.3987498483069,118.73440300041693,8173.7291119989095,14599.424242424242
1706183008,1,,Aggregated,0.900000,0.000000,580,590,620,660,680,2000,8200,8200,8200,8200,8200,34,0,570.0,841.1540267645571,118.73440300041693,8173.7291119989095,14437.735294117647
1706183009,1,,Aggregated,0.900000,0.000000,580,600,620,660,680,2000,8200,8200,8200,8200,8200,35,0,580.0,834.5709369998596,118.73440300041693,8173.7291119989095,14534.371428571429
1706183010,1,,Aggregated,0.900000,0.000000,590,600,620,630,680,2000,8200,8200,8200,8200,8200,36,0,580.0,828.2530228887279,118.73440300041693,8173.7291119989095,14625.638888888889
1706183011,1,,Aggregated,0.900000,0.000000,580,600,610,630,680,2000,8200,8200,8200,8200,8200,37,0,580.0,818.9204630268521,118.73440300041693,8173.7291119989095,14476.351351351352
1706183012,1,,Aggregated,0.900000,0.000000,590,600,610,630,680,2000,8200,8200,8200,8200,8200,38,0,580.0,812.8096968419318,118.73440300041693,8173.7291119989095,14564.342105263158
1706183013,1,,Aggregated,0.900000,0.000000,590,600,610,630,680,2000,8200,8200,8200,8200,8200,39,0,590.0,807.3217207690901,118.73440300041693,8173.7291119989095,14647.820512820514
1706183014,1,,Aggregated,0.900000,0.000000,590,600,610,630,680,2000,8200,8200,8200,8200,8200,40,0,580.0,799.1415515498829,118.73440300041693,8173.7291119989095,14509.175
11 changes: 11 additions & 0 deletions performance-tests/tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# branch_name=$(git rev-parse --abbrev-ref HEAD)
commit=$(git rev-parse --short HEAD)
locust \
--host http://localhost:8000 \
--bsn 111111110 \
--run-time 60s \
--headless \
--only-summary \
--csv="results/${commit}"

0 comments on commit 16d2a3c

Please sign in to comment.