Skip to content

Commit 2053472

Browse files
committed
add common as a package
1 parent fabf13e commit 2053472

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[project]
2+
name = "common"
3+
version = "0.1.0"
4+
description = "Common utilities for performance tests"
5+
requires-python = ">=3.11"
6+
7+
[tool.setuptools.packages.find]
8+
where = ["."]

tests/performance/locustfiles/deployment_max_rps_single_endpoint.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from collections.abc import Callable
1313

1414
from common.base_user import OsparcWebUserBase
15-
from locust import events, task
15+
from locust import events, run_single_user, task
1616
from locust.argument_parser import LocustArgumentParser
1717

1818

@@ -52,3 +52,7 @@ def get_endpoint(self) -> None:
5252
if len(self.environment.parsed_options.body) > 0:
5353
kwargs["data"] = self.environment.parsed_options.body
5454
method(self.environment.parsed_options.endpoint, **kwargs)
55+
56+
57+
if __name__ == "__main__":
58+
run_single_user(WebApiUser)

tests/performance/requirements/dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@
2121
--requirement _tools.txt
2222

2323
# installs this repo's packages
24+
--editable ./common/

0 commit comments

Comments
 (0)