Skip to content

per-second request rate calculator#31

Open
boonious wants to merge 3 commits intomasterfrom
rps-calculation
Open

per-second request rate calculator#31
boonious wants to merge 3 commits intomasterfrom
rps-calculation

Conversation

@boonious
Copy link
Contributor

@boonious boonious commented Sep 4, 2020

The PR creates a GenServer-based calculator that computes and stores the per-second request rate (RPS) of all traffics hitting the OriginSimulator.

iex> OriginSimulator.RateCalculator.rate()

OriginSimulator.Counter has also been refactored (with additional unit tests) as part of this PR such that it is no longer a singleton process with a hard-coded name. This enables the test counter to be created and tested in isolation via ExUnit.start_supervised, for both OriginSimulator.Counter and OriginSimulator.RateCalculator.

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

Comments