Skip to content

[Feature]: Support inf value for burstiness in benchmarks #26940

@sducouedic

Description

@sducouedic

🚀 The feature, motivation and pitch

In the benchmarks, the burstiness value is used in a gamma distribution to sample the delays between consecutive requests.

theta = 1.0 / (current_request_rate * burstiness)
delay_ts.append(np.random.gamma(shape=burstiness, scale=theta))

Theoretically (and this is also what is observed in practice), the generated delays have as mean 1.0 / current_request_rate and the spread is controlled by the burstiness. When the burstiness is high, we observe lower variance in the delay values, all values being closer to the mean 1.0 / current_request_rate. When burstiness tends to infinity, we should observe a single generated delay, which is 1.0 / current_request_rate. In practice, the np.random.gamma function generates nan as results, so we need to manually condition on burstiness value and append 1.0 / current_request_rate to the list of delays when burstiness becomes infinite.

See attached image as mathematical proof

Image

Alternatives

No response

Additional context

No response

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions