Class: Audit::Ovl::QueryCounter
- Inherits:
-
Object
- Object
- Audit::Ovl::QueryCounter
- Defined in:
- lib/audit_ovl/query_counter.rb
Constant Summary collapse
- THREAD_KEY =
:audit_ovl_query_count
Class Method Summary collapse
Class Method Details
.count ⇒ Object
17 18 19 |
# File 'lib/audit_ovl/query_counter.rb', line 17 def count Thread.current[THREAD_KEY] || 0 end |
.reset ⇒ Object
21 22 23 |
# File 'lib/audit_ovl/query_counter.rb', line 21 def reset Thread.current[THREAD_KEY] = 0 end |
.start_tracking ⇒ Object
12 13 14 15 |
# File 'lib/audit_ovl/query_counter.rb', line 12 def start_tracking Thread.current[THREAD_KEY] = 0 subscribe end |