Skip to content

Make RateLimiter tests more consistent#787

Merged
kevingosse merged 1 commit into
masterfrom
kevin/ratelimitertests
Jul 8, 2020
Merged

Make RateLimiter tests more consistent#787
kevingosse merged 1 commit into
masterfrom
kevin/ratelimitertests

Conversation

@kevingosse

Copy link
Copy Markdown
Contributor
  • Reuse the same workers for each burst
  • Remove the initialization/warmup time from the "elapsed" computation
  • Simplify synchronization by using Barrier

- Reuse the same workers for each burst
- Remove the initialization/warmup time from the "elapsed" computation
- Simplify synchronization by using Barrier
@kevingosse
kevingosse requested a review from a team as a code owner July 7, 2020 13:38
}

resetEvent.Set();
var barrier = new Barrier(parallelism + 1);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! TIL about System.Threading.Barrier.

@tonyredondo tonyredondo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@kevingosse
kevingosse merged commit 7f3529c into master Jul 8, 2020
@kevingosse
kevingosse deleted the kevin/ratelimitertests branch July 8, 2020 10:43
@zacharycmontoya zacharycmontoya added this to the 1.18.2 milestone Jul 9, 2020
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.

4 participants