Skip to content

fixed injection rate throttling - #1

Open
matthieumorel wants to merge 1 commit into
leoneu:masterfrom
matthieumorel:throttling-fix
Open

fixed injection rate throttling#1
matthieumorel wants to merge 1 commit into
leoneu:masterfrom
matthieumorel:throttling-fix

Conversation

@matthieumorel

Copy link
Copy Markdown

above an event rate of 1000, eventPeriod has a value of 0 if it's a long
this.eventPeriod = (long) (1000f / eventRate);

therefore, the delta that determines whether to hold injection is always > 0
long delta = (time - startTime) - (eventPeriod * eventCount);

as a result, injection is never paused for rates above 1000.

Using a float for the eventPeriod solves this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant