locust 2.37.9.dev3__py3-none-any.whl → 2.37.10.dev2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of locust might be problematic. Click here for more details.

locust/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '2.37.9.dev3'
21
- __version_tuple__ = version_tuple = (2, 37, 9, 'dev3')
20
+ __version__ = version = '2.37.10.dev2'
21
+ __version_tuple__ = version_tuple = (2, 37, 10, 'dev2')
locust/argument_parser.py CHANGED
@@ -769,6 +769,12 @@ Typically ONLY these options (and --locustfile) need to be specified on workers,
769
769
  action="store_true",
770
770
  help="Prints the final stats in JSON format to stdout. Useful for parsing the results in other programs/scripts. Use together with --headless and --skip-log for an output only with the json data.",
771
771
  )
772
+ stats_group.add_argument(
773
+ "--json-file",
774
+ metavar="<filename>",
775
+ dest="json_file",
776
+ help="Prints the final stats in JSON format to file path specified.",
777
+ )
772
778
 
773
779
  log_group = parser.add_argument_group("Logging options")
774
780
  log_group.add_argument(
locust/main.py CHANGED
@@ -649,6 +649,8 @@ See https://github.com/locustio/locust/wiki/Installation#increasing-maximum-numb
649
649
  runner.quit()
650
650
  if options.json:
651
651
  stats.print_stats_json(runner.stats)
652
+ if options.json_file:
653
+ stats.save_stats_json(runner.stats, options.json_file)
652
654
  elif not isinstance(runner, locust.runners.WorkerRunner):
653
655
  stats.print_stats(runner.stats, current=False)
654
656
  stats.print_percentile_stats(runner.stats)
locust/stats.py CHANGED
@@ -820,6 +820,11 @@ def print_stats_json(stats: RequestStats) -> None:
820
820
  print(json.dumps(stats.serialize_stats(), indent=4))
821
821
 
822
822
 
823
+ def save_stats_json(stats: RequestStats, filename: str) -> None:
824
+ with open(f"{filename}.json", "w") as file:
825
+ json.dump(stats.serialize_stats(), file, indent=4)
826
+
827
+
823
828
  def get_stats_summary(stats: RequestStats, current=True) -> list[str]:
824
829
  """
825
830
  stats summary will be returned as list of string
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: locust
3
- Version: 2.37.9.dev3
3
+ Version: 2.37.10.dev2
4
4
  Summary: Developer-friendly load testing framework
5
5
  Project-URL: homepage, https://locust.io/
6
6
  Project-URL: repository, https://github.com/locustio/locust
@@ -1,7 +1,7 @@
1
1
  locust/__init__.py,sha256=aWeuBPUxONjwNm1xp4v8L4BO14SuYLjscIiwJVX1Ui4,1746
2
2
  locust/__main__.py,sha256=vBQ82334kX06ImDbFlPFgiBRiLIinwNk3z8Khs6hd74,31
3
- locust/_version.py,sha256=I2cv4E4Ilcmc1H-NOZQ2G48D0-WJwqDZEKSK2VEcRgg,526
4
- locust/argument_parser.py,sha256=udbiBhZQfJVVIcLb4zHXRs7u4sQBl02_rogEUazfDik,32890
3
+ locust/_version.py,sha256=yODqXtLwNgYbIUhYyBgRLW1aYLGqIE_VLJ1H_lfVcEA,528
4
+ locust/argument_parser.py,sha256=oO2Hi13tp_vRqOCQoA44l9qwP1Zeg-0KcnkynvwDqBM,33083
5
5
  locust/clients.py,sha256=o-277lWQdpmPnoRTdf3IQVNPQT8LMFDtPtuxbLHQIIs,19286
6
6
  locust/debug.py,sha256=7CCm8bIg44uGH2wqBlo1rXBzV2VzwPicLxLewz8r5CQ,5099
7
7
  locust/dispatch.py,sha256=prdwtb9EoN4A9klgiKgWuwQmvFB8hEuFHOK6ot62AJI,16202
@@ -11,11 +11,11 @@ locust/exception.py,sha256=jGgJ32ubuf4pWdlaVOkbh2Y0LlG0_DHi-lv3ib8ppOE,1791
11
11
  locust/html.py,sha256=VjoAEZEolJ8il4HLACBlVA81Qk36fBwlDj_7ojAEFss,4132
12
12
  locust/input_events.py,sha256=lqLDB2Ax-OQ7-vtYNkGjySjfaWVobBzqf0GxRwjcLcQ,3323
13
13
  locust/log.py,sha256=5E2ZUOa3V4sfCqa-470Gle1Ik9L5nxYitsjEB9tRwE0,3455
14
- locust/main.py,sha256=6SVMbo2qcQGbWMz2xUixO7eegayQz2VCrQaMN4-kIh8,28399
14
+ locust/main.py,sha256=sqqpS_5nuaimvH3ZnyNlfX5Dl4zJzO9Cls6Bbh-G9m4,28496
15
15
  locust/py.typed,sha256=gkWLl8yD4mIZnNYYAIRM8g9VarLvWmTAFeUfEbxJLBw,65
16
16
  locust/runners.py,sha256=niYmGsfOpxMfVmTXGod4MYTefpaZ2wirFlhqxRw5mq4,70617
17
17
  locust/shape.py,sha256=t-lwBS8LOjWcKXNL7j2U3zroIXJ1b0fazUwpRYQOKXw,1973
18
- locust/stats.py,sha256=D2iJ7Ei1Z_e3cF5n8TdSstpewZytnSmstTjxr5c9uNw,47264
18
+ locust/stats.py,sha256=1BDBENgh8iFw20boDP_xEV6PxlQqdJwKnRAe4K3YyfA,47438
19
19
  locust/web.py,sha256=rEuNT_2ruzRfhCRJZQMy-iOwu04yr588i9Q-V_TOjDA,31453
20
20
  locust/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  locust/contrib/fasthttp.py,sha256=BCuKG0qpBIhXdejjPSbAMSaSd6piJtuLdx96_LWbIgI,29349
@@ -51,8 +51,8 @@ locust/webui/dist/assets/graphs-light.png,sha256=7L6pOehXqCojQclzeP91l-LskFQAw_n
51
51
  locust/webui/dist/assets/index-4Ae7-bG8.js,sha256=GQ98g14JJST1V-UrbqXk5GVB6Sw_S35TAkdi19d_rTc,1723604
52
52
  locust/webui/dist/assets/testruns-dark.png,sha256=np6MvpgJ2gkKQ66SOmukLtjsMtHqTSr5dNfza-2XtCo,267621
53
53
  locust/webui/dist/assets/testruns-light.png,sha256=iLAxBZh3kRsfGkcB1-1KSAbFgGji43IqiUrYuJlUoPk,276839
54
- locust-2.37.9.dev3.dist-info/METADATA,sha256=Z1u_GCqJJjs8O9lF_Il97URjS2q5HmwbKMpYLMCYMDg,9403
55
- locust-2.37.9.dev3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
56
- locust-2.37.9.dev3.dist-info/entry_points.txt,sha256=RAdt8Ku-56m7bFjmdj-MBhbF6h4NX7tVODR9QNnOg0E,44
57
- locust-2.37.9.dev3.dist-info/licenses/LICENSE,sha256=5hnz-Vpj0Z3kSCQl0LzV2hT1TLc4LHcbpBp3Cy-EuyM,1110
58
- locust-2.37.9.dev3.dist-info/RECORD,,
54
+ locust-2.37.10.dev2.dist-info/METADATA,sha256=N7A4NBwofar6g3_Q8X1gusWdW0MpJFa99B0NiMP0UA8,9404
55
+ locust-2.37.10.dev2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
56
+ locust-2.37.10.dev2.dist-info/entry_points.txt,sha256=RAdt8Ku-56m7bFjmdj-MBhbF6h4NX7tVODR9QNnOg0E,44
57
+ locust-2.37.10.dev2.dist-info/licenses/LICENSE,sha256=5hnz-Vpj0Z3kSCQl0LzV2hT1TLc4LHcbpBp3Cy-EuyM,1110
58
+ locust-2.37.10.dev2.dist-info/RECORD,,