CircuitSwitch.run and CircuitSwitch.report increment run_count and report_count when they are called.
If many method calls pour into, CircuitSwitch tries writing to the single record frequently.
This might cause too many Deadlock and increase cpu load.
I have 2 plans.
- Add apis not to increment count.
- Rewrite gem, modify data store to Redis.