Skip to content

Commit

Permalink
Update locust_exporter.py
Browse files Browse the repository at this point in the history
"Modified metric name from Total to Aggregated since Locust stats doesn't have anything named as total"
  • Loading branch information
rkhemka24 authored Mar 25, 2022
1 parent 13e10a8 commit 51b5133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion locust_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def collect(self):
mtype = 'counter'
metric = Metric('locust_requests_'+mtr, 'Locust requests '+mtr, mtype)
for stat in response['stats']:
if not 'Total' in stat['name']:
if not 'Aggregated' in stat['name']:
metric.add_sample('locust_requests_'+mtr, value=stat[mtr], labels={'path':stat['name'], 'method':stat['method']})
yield metric

Expand Down

0 comments on commit 51b5133

Please sign in to comment.