Skip to content

feat(locust): Add sort_stats option to sort stats table alphabetically#169

Merged
jhutar merged 2 commits into
redhat-performance:mainfrom
pablomh:sort-stats-option
Apr 22, 2026
Merged

feat(locust): Add sort_stats option to sort stats table alphabetically#169
jhutar merged 2 commits into
redhat-performance:mainfrom
pablomh:sort-stats-option

Conversation

@pablomh
Copy link
Copy Markdown
Contributor

@pablomh pablomh commented Apr 21, 2026

Summary

  • Add sort_stats parameter to run_locust() and show_locust_stats() that sorts the stats table entries alphabetically by request name
  • Defaults to False to preserve existing insertion-order behavior
  • Callers opt in via sort_stats=True for readable output when testing many endpoints

Context

When running Locust tests against many endpoints (e.g. all Satellite menu pages), the stats table is printed in request-execution order which makes it hard to compare across runs. This adds an opt-in sort without changing the default behavior.

Test plan

  • Run existing Locust tests without sort_stats — verify output order is unchanged
  • Run with sort_stats=True — verify alphabetical ordering with SUMMARY at the end

🤖 Generated with Claude Code

Add sort_stats parameter to run_locust() and show_locust_stats() that
sorts the stats table entries alphabetically by request name. Defaults
to False to preserve existing insertion-order behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pablomh pablomh force-pushed the sort-stats-option branch from 7f77475 to d940d23 Compare April 21, 2026 22:32
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jhutar jhutar merged commit 7b674f3 into redhat-performance:main Apr 22, 2026
1 check passed
@pablomh pablomh deleted the sort-stats-option branch April 22, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants