Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Aug 30, 2024

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

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
62 checks passed
@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