Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Http requests count double with 'constant-arrival-rate' executor #26

@rade-popovic

Description

@rade-popovic

I'm using the latest v0.38.0 version of the k6 with the xk6-output-prometheus-remote extension.
I've tried several scenarios with the constant-arrival-rate executor and always got the same results. The iterations metric was counted two times more than expected.
I've created the simple Counter to prove my theory and got the same 'doubled' results.

Here is an example script:

import http from 'k6/http'; import {Counter} from 'k6/metrics'; export const options = { linger: true, scenarios: { contacts: { executor: 'constant-arrival-rate', duration: '30s', rate: 10, timeUnit: '1s', preAllocatedVUs: 1, maxVUs: 150, }, }, }; const durationCounter = new Counter('dur_counter'); export default function () { var res = http.get('http://test.k6.io'); if (res.status == 200) { durationCounter.add(1); } } 

Here are the results
Screenshot 2022-06-05 at 21 46 44

The number of HTTP requests sent to the server is correct, I've checked on my local machine (10 qps).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions