locust 2.32.11.dev9__tar.gz → 2.32.11.dev11__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/PKG-INFO +1 -1
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/_version.py +2 -2
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/argument_parser.py +4 -1
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/html.py +19 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/main.py +2 -1
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/.gitignore +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/LICENSE +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/README.md +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/hatch_build.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/__init__.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/__main__.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/clients.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/contrib/__init__.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/contrib/fasthttp.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/contrib/mongodb.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/contrib/postgres.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/debug.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/dispatch.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/env.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/event.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/exception.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/input_events.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/log.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/py.typed +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/rpc/__init__.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/rpc/protocol.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/rpc/zmqrpc.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/runners.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/shape.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/stats.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/user/__init__.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/user/inspectuser.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/user/sequential_taskset.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/user/task.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/user/users.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/user/wait_time.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/util/__init__.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/util/cache.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/util/date.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/util/deprecation.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/util/directory.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/util/exception_handler.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/util/load_locustfile.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/util/rounding.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/util/timespan.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/util/url.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/web.py +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/webui/dist/assets/favicon-dark.png +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/webui/dist/assets/favicon-light.png +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/webui/dist/assets/graphs-dark.png +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/webui/dist/assets/graphs-light.png +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/webui/dist/assets/index-DnScW665.js +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/webui/dist/assets/testruns-dark.png +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/webui/dist/assets/testruns-light.png +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/webui/dist/auth.html +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/webui/dist/index.html +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/locust/webui/dist/report.html +0 -0
- {locust-2.32.11.dev9 → locust-2.32.11.dev11}/pyproject.toml +0 -0
@@ -12,5 +12,5 @@ __version__: str
|
|
12
12
|
__version_tuple__: VERSION_TUPLE
|
13
13
|
version_tuple: VERSION_TUPLE
|
14
14
|
|
15
|
-
__version__ = version = '2.32.11.
|
16
|
-
__version_tuple__ = version_tuple = (2, 32, 11, '
|
15
|
+
__version__ = version = '2.32.11.dev11'
|
16
|
+
__version_tuple__ = version_tuple = (2, 32, 11, 'dev11')
|
@@ -208,6 +208,9 @@ Usage: locust [options] [UserClass ...]
|
|
208
208
|
|
209
209
|
locust --headless -u 100 -t 20m --processes 4 MyHttpUser AnotherUser
|
210
210
|
|
211
|
+
locust --headless -u 100 -r 10 -t 50 --print-stats --html "test_report_{u}_{r}_{t}.html" -H https://www.example.com
|
212
|
+
(The above run would generate an html file with the name "test_report_100_10_50.html")
|
213
|
+
|
211
214
|
See documentation for more details, including how to set options using a file or environment variables: https://docs.locust.io/en/stable/configuration.html""",
|
212
215
|
)
|
213
216
|
parser.add_argument(
|
@@ -754,7 +757,7 @@ Typically ONLY these options (and --locustfile) need to be specified on workers,
|
|
754
757
|
"--html",
|
755
758
|
metavar="<filename>",
|
756
759
|
dest="html_file",
|
757
|
-
help="Store HTML report to file path specified",
|
760
|
+
help="Store HTML report to file path specified. Able to parse certain tags - {u}, {r}, {t} and convert them to number of users, spawn rate and run time respectively.",
|
758
761
|
env_var="LOCUST_HTML",
|
759
762
|
)
|
760
763
|
stats_group.add_argument(
|
@@ -15,6 +15,25 @@ PERCENTILES_FOR_HTML_REPORT = [0.50, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 1.0]
|
|
15
15
|
DEFAULT_BUILD_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "webui", "dist")
|
16
16
|
|
17
17
|
|
18
|
+
def process_html_filename(options) -> None:
|
19
|
+
num_users = options.num_users
|
20
|
+
spawn_rate = options.spawn_rate
|
21
|
+
run_time = options.run_time
|
22
|
+
|
23
|
+
option_mapping = {
|
24
|
+
"{u}": num_users,
|
25
|
+
"{r}": spawn_rate,
|
26
|
+
"{t}": run_time,
|
27
|
+
}
|
28
|
+
|
29
|
+
html_filename = options.html_file
|
30
|
+
|
31
|
+
for option_term, option_value in option_mapping.items():
|
32
|
+
html_filename = html_filename.replace(option_term, str(int(option_value)))
|
33
|
+
|
34
|
+
options.html_file = html_filename
|
35
|
+
|
36
|
+
|
18
37
|
def render_template_from(file, build_path=DEFAULT_BUILD_PATH, **kwargs):
|
19
38
|
env = JinjaEnvironment(loader=FileSystemLoader(build_path))
|
20
39
|
template = env.get_template(file)
|
@@ -20,7 +20,7 @@ import gevent
|
|
20
20
|
from . import log, stats
|
21
21
|
from .argument_parser import parse_locustfile_option, parse_options
|
22
22
|
from .env import Environment
|
23
|
-
from .html import get_html_report
|
23
|
+
from .html import get_html_report, process_html_filename
|
24
24
|
from .input_events import input_listener
|
25
25
|
from .log import greenlet_exception_logger, setup_logging
|
26
26
|
from .stats import (
|
@@ -651,6 +651,7 @@ See https://github.com/locustio/locust/wiki/Installation#increasing-maximum-numb
|
|
651
651
|
|
652
652
|
def save_html_report():
|
653
653
|
html_report = get_html_report(environment, show_download_link=False)
|
654
|
+
process_html_filename(options)
|
654
655
|
logger.info("writing html report to file: %s", options.html_file)
|
655
656
|
with open(options.html_file, "w", encoding="utf-8") as file:
|
656
657
|
file.write(html_report)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|