Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kristianhald/81d00afc036001afaac3c7d8927b6864 to your computer and use it in GitHub Desktop.
Save kristianhald/81d00afc036001afaac3c7d8927b6864 to your computer and use it in GitHub Desktop.
Performance with the latest changeset being:
https://github.com/kristianhald/Polly/commit/7165c90e3dbd5ea75e6048f94e477bf0bcd6f4a5
Iterations per test: 100000
================
Empty delegates only
----------------
Total ticks : 0000008221
Per 100 iterations ticks : 0000000008
Per iteration ticks : 0000000000
================
Original CircuitBreaker wrapping empty delegates only
----------------
Total ticks : 0000081003
Per 100 iterations ticks : 0000000081
Per iteration ticks : 0000000000
================
Additional from Original CircuitBreaker wrapping empty
----------------
Total ticks : 0000072782
Per 100 iterations ticks : 0000000072
Per iteration ticks : 0000000000
================
10 good 10 bad, no CircuitBreaker
----------------
Total ticks : 0002784848
Per 100 iterations ticks : 0000002784
Per iteration ticks : 0000000027
================
Original CircuitBreaker wrapping 10 good, 10 bad
----------------
Total ticks : 0005525417
Per 100 iterations ticks : 0000005525
Per iteration ticks : 0000000055
================
Additional from breaker managing exceptions, and breaking every 10 exceptions
----------------
Total ticks : 0002740569
Per 100 iterations ticks : 0000002740
Per iteration ticks : 0000000027
================
TimesliceCircuitBreaker wrapping 10 good, 10 bad
----------------
Total ticks : 0006098737
Per 100 iterations ticks : 0000006098
Per iteration ticks : 0000000060
================
Additional from TimesliceCircuitBreaker managing exceptions, and breaking every 10 exceptions
----------------
Total ticks : 0003313889
Per 100 iterations ticks : 0000003313
Per iteration ticks : 0000000033
Circuit breaks during original breaker test: 5000
Circuit breaks during new breaker test : 5000
Comparability (1 is good): 1
@kristianhald
Copy link
Author

This is the performance for the advanced circuit breaker, where it always uses 10 windows for the entire duration.
The performance program was taken from: https://gist.github.com/reisenberger/92dc8d73b4df127b296ed8daee3ed93d

The difference between this and 'https://gist.github.com/kristianhald/534ed0540e8030060f1c49da04100e4a' is that this uses an interface in the controller, allowing the implementation of the health metrics to be changed without changing the code. Seems like there is about ~10 ticks difference per iteration.

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