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

[test-only] simulations use tritium metric registry #358

Merged
merged 14 commits into from
Feb 18, 2020

Conversation

iamdanfox
Copy link
Contributor

@iamdanfox iamdanfox commented Feb 18, 2020

Before this PR

My simulation was keeping track of a map of metrics like an animal.

After this PR

==COMMIT_MSG==
Simulation metrics are now tracked in a tritium TaggedMetricRegistry implementation, which is hooked up to the simulation clock.
==COMMIT_MSG==

This PR also uses this new metricregistry to better record the global number of responses returned and also verify that all of them were closed. Graphs will also display tags nicely, where previously I was doing string concatenation!

As a bonus, gradle compilation is now much snappier.

Possible downsides?

build.gradle Outdated Show resolved Hide resolved
one_endpoint_dies_on_each_server[ROUND_ROBIN].txt: success=67.6% client_mean=PT0.6S server_cpu=PT5M6S client_received=510/510 server_resps=510 codes={200=345, 500=165}
simplest_possible_case[CONCURRENCY_LIMITER].txt: success=100.0% client_mean=PT0.7998S server_cpu=PT13M19.8S client_received=1000/1000 server_resps=1000 codes={200=1000}
simplest_possible_case[ROUND_ROBIN].txt: success=100.0% client_mean=PT0.7998S server_cpu=PT13M19.8S client_received=1000/1000 server_resps=1000 codes={200=1000}
slow_503s_then_revert[CONCURRENCY_LIMITER].txt: success=100.0% client_mean=PT0.129949S server_cpu=PT6M29.847333275S client_received=3000/3000 server_resps=3130 codes={200=3000}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is an example where our RetryingChannel kicked in and resulted in servers producing responding 3130 responses, but clients just perceived 3000 green responses (as the retries were eventually successful).

@iamdanfox iamdanfox changed the title [test-only] simulations use tritium metric registry [test-only] simulations use tritium metric registry & gradle speedup Feb 18, 2020
() -> {
long micros =
TimeUnit.MICROSECONDS.convert(simulation.clock().read() - start, TimeUnit.NANOSECONDS);
histogram.update(micros);
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use a timer instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have updated to use the vanilla InstrumentedChannel!

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

@iamdanfox iamdanfox force-pushed the dfox/response-bodies branch from 7663dc6 to a63dd26 Compare February 18, 2020 14:05
@iamdanfox iamdanfox force-pushed the dfox/response-bodies branch from a63dd26 to 6008dd7 Compare February 18, 2020 14:08
@carterkozak carterkozak changed the title [test-only] simulations use tritium metric registry & gradle speedup [test-only] simulations use tritium metric registry Feb 18, 2020
@iamdanfox iamdanfox force-pushed the dfox/response-bodies branch from f847202 to c19b20d Compare February 18, 2020 14:10
@iamdanfox
Copy link
Contributor Author

Ok I think this is ready to go :)

@bulldozer-bot bulldozer-bot bot merged commit 4dc3e9b into develop Feb 18, 2020
@bulldozer-bot bulldozer-bot bot deleted the dfox/response-bodies branch February 18, 2020 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants