-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
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} |
There was a problem hiding this comment.
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).
simulation/src/main/java/com/palantir/dialogue/core/SimulationMetricsReporter.java
Outdated
Show resolved
Hide resolved
() -> { | ||
long micros = | ||
TimeUnit.MICROSECONDS.convert(simulation.clock().read() - start, TimeUnit.NANOSECONDS); | ||
histogram.update(micros); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
7663dc6
to
a63dd26
Compare
a63dd26
to
6008dd7
Compare
f847202
to
c19b20d
Compare
Ok I think this is ready to go :) |
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?