Skip to content

fix: prevent incorrect "multiple metric batches" warning in tests with pause phases#3331

Merged
hassy merged 5 commits intomainfrom
fix/multiple-batches-with-pause
Aug 30, 2024
Merged

fix: prevent incorrect "multiple metric batches" warning in tests with pause phases#3331
hassy merged 5 commits intomainfrom
fix/multiple-batches-with-pause

Conversation

@hassy
Copy link
Member

@hassy hassy commented Aug 30, 2024

Description

Running a test with a pause phase will often print an incorrect warning:

Warning: multiple batches of metrics for period

This PR fixes that behavior.

Pre-merge checklist

This is for use by the Artillery team. Please leave this in if you're contributing to Artillery.

  • Does this require an update to the docs? No
  • Does this require a changelog entry? Yes

hassy added 5 commits August 30, 2024 09:57
Sending an empty stats object by default for every idle phase
can lead to duplicate stats objects being sent for the same
period, which leads to (incorrect) "multiple metric batches"
warnings printed to the user.

Consider the following phase definition:

phases:
  - duration: 10
    arrivalRate: 1
  - pause: 10

Current behavior will lead to two stats objects being sent
for the period that the pause phase falls into:

- The empty stats object
- A stats object containing measurements from some of the VUs
  from the first phase
@hassy hassy merged commit 917e521 into main Aug 30, 2024
@hassy hassy deleted the fix/multiple-batches-with-pause branch August 30, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant