microsoftarchive / data-pipeline

Exploring the problem of high-scale data ingestion on Azure
MIT License
6 stars 4 forks source link

improve Dispatcher.CircuitBreaker performance by checking level in Decrement() #9

Open ghost opened 9 years ago

ghost commented 9 years ago

In the Dispatcher.CircuitBreaker class, in the Decrement() method, we can check currentCount and stop the circuit breaker instead of waiting for the timeout to check the level.

This is a slight performance optimization. Can we define a test that demonstrates the efficacy of this change?