From 84bb2d36ed829ad4883ab7bdf08479817723dfcd Mon Sep 17 00:00:00 2001 From: Ankit Mehta Date: Mon, 25 Nov 2019 13:13:41 -0500 Subject: [PATCH] Address CR comments by Matt K --- locust/main.py | 6 +++--- locust/stats.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/locust/main.py b/locust/main.py index bb2b1e47db..ee9dac037b 100644 --- a/locust/main.py +++ b/locust/main.py @@ -70,7 +70,7 @@ def parse_options(args=None, default_config_files=['~/.locust.conf','locust.conf '--csv-full-history', action='store_true', default=False, - dest='statshistory', + dest='stats_history_enabled', help="Store each stats entry in CSV format to _stats_history.csv file", ) @@ -504,7 +504,7 @@ def timelimit_stop(): stats_printer_greenlet = gevent.spawn(stats_printer) if options.csvfilebase: - gevent.spawn(stats_writer, options.csvfilebase, options.statshistory) + gevent.spawn(stats_writer, options.csvfilebase, options.stats_history_enabled) def shutdown(code=0): @@ -522,7 +522,7 @@ def shutdown(code=0): print_stats(runners.locust_runner.stats, current=False) print_percentile_stats(runners.locust_runner.stats) if options.csvfilebase: - write_stat_csvs(options.csvfilebase, options.statshistory) + write_stat_csvs(options.csvfilebase, options.stats_history_enabled) print_error_report() sys.exit(code) diff --git a/locust/stats.py b/locust/stats.py index 22c88cbbb5..829709110e 100644 --- a/locust/stats.py +++ b/locust/stats.py @@ -880,11 +880,11 @@ def stats_history_csv(stats_history_enabled=False): 1.0 ] - include_stats_entries_per_iteration = [] + stats_entries_per_iteration = [] if stats_history_enabled: - include_stats_entries_per_iteration = sort_stats(runners.locust_runner.request_stats) + stats_entries_per_iteration = sort_stats(runners.locust_runner.request_stats) - for s in chain(include_stats_entries_per_iteration, [runners.locust_runner.stats.total]): + for s in chain(stats_entries_per_iteration, [runners.locust_runner.stats.total]): if s.num_requests: percentile_str = ','.join([ str(int(s.get_response_time_percentile(x) or 0)) for x in PERCENTILES_TO_REPORT])