Closed 0einstein0 closed 1 month ago
Testing Tool used: https://locust.io/ https://docs.locust.io/en/stable/
Users: 100 Images: 10 pyramidal tiff Endpoint1: Image with various dimensions,scale and rotation Endpoint2: Thumbnails Endpoint3: Info.json
locustfile.py
from locust import HttpUser, task, between import random class ImageEndpointUser(HttpUser): wait_time = between(1, 2) @task def test_image_endpoints_1(self): self.access_image_endpoint(1) @task def test_image_endpoints_2(self): self.access_image_endpoint(2) @task def test_image_endpoints_3(self): self.access_image_endpoint(3) @task def test_image_endpoints_4(self): self.access_image_endpoint(4) @task def test_image_endpoints_5(self): self.access_image_endpoint(5) @task def test_image_endpoints_6(self): self.access_image_endpoint(6) @task def test_image_endpoints_7(self): self.access_image_endpoint(7) @task def test_image_endpoints_8(self): self.access_image_endpoint(8) @task def test_image_endpoints_9(self): self.access_image_endpoint(9) @task def test_image_endpoints_10(self): self.access_image_endpoint(10) def access_image_endpoint(self, index): img_name = f"img{index}.tif" x = random.randint(1, 2000) y = random.randint(1, 2000) h = random.randint(1, 2000) w = random.randint(1, 2000) s = 256 * random.choice([1,2,4,8]) r = random.choice([0, 90, 180, 270]) endpoint1 = f"/iiif/{img_name}/{x},{y},{h},{w}/^{s},/{r}/default.jpg" endpoint2 = f"/iiif/{img_name}/full/,120/0/default.jpg" endpoint3 = f"/iiif/{img_name}/info.json" print(endpoint1) self.client.get(endpoint1, name=f"/iiif/{img_name}") self.client.get(endpoint2, name=f"/iiif/{img_name}/default.jpg") self.client.get(endpoint3, name=f"/iiif/{img_name}/info.json")
Results report_1714039493.141505.pdf
This is deployed on production now, so I think we're good on performance :)
Testing Tool used: https://locust.io/ https://docs.locust.io/en/stable/
locustfile.py
Results report_1714039493.141505.pdf