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

Possible rate calculation issue #81

Closed
martinreus-form3 opened this issue Jul 30, 2021 · 2 comments
Closed

Possible rate calculation issue #81

martinreus-form3 opened this issue Jul 30, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@martinreus-form3
Copy link
Contributor

martinreus-form3 commented Jul 30, 2021

While creating some test run scenarios for f1 defining constant rates, I found out that the calculated rate does not entirely work as expected; This was primarily discovered while creating f1-jobs ran in our staging env. Still need confirmation if coding a simple scenario locally would yield the same result (will do this once I have some time and open an example PR)

Example cases:

  • Constant rate of 1/300ms does not work at all
  • Constant rate of 1/215ms results in precisely 5TPS, when it should yield approx. 4.65. Additionally, setting rate to 1/299ms results in the same 5 TPS.
@martinreus-form3 martinreus-form3 added the bug Something isn't working label Jul 30, 2021
pippo added a commit to pippo/f1 that referenced this issue Oct 21, 2021
Regular distrubution rate function didn't produce the rate correctly whenever
iteration interval 3x bigger than distributedIterationDuration, due to rounding
error.

Relates to form3tech-oss#81
pippo added a commit to pippo/f1 that referenced this issue Oct 24, 2021
Regular distrubution rate function didn't produce the rate correctly whenever
iteration interval 3x bigger than distributedIterationDuration, due to rounding
error.

Relates to form3tech-oss#81
@pippo
Copy link

pippo commented Oct 24, 2021

Constant rate of 1/300ms does not work at all

This appear to be coming from rounding error.
PR #88 attempts to address it, by introducing float comparison tolerance.

Constant rate of 1/215ms results in precisely 5TPS, when it should yield approx. 4.65. Additionally, setting rate to 1/299ms results in the same 5 TPS.

This seems to be intended by design, based on the code. The "regular" distribution has a fixed resolution of 100 ms, and therefore iteration duration is rounded down to 100 ms. As a result 200ms, 215ms, and 299ms are essentially the same thing.

@nvloff-f3
Copy link
Contributor

Fixed by #141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants