Class: ActionCost::StatsCollector
- Inherits:
-
Object
- Object
- ActionCost::StatsCollector
- Defined in:
- lib/action_cost/stats_collector.rb
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize ⇒ StatsCollector
constructor
A new instance of StatsCollector.
- #log ⇒ Object
- #push(request) ⇒ Object
Constructor Details
#initialize ⇒ StatsCollector
Returns a new instance of StatsCollector.
3 4 5 |
# File 'lib/action_cost/stats_collector.rb', line 3 def initialize @stats = {} end |
Instance Method Details
#data ⇒ Object
16 17 18 |
# File 'lib/action_cost/stats_collector.rb', line 16 def data @stats end |
#log ⇒ Object
12 13 14 |
# File 'lib/action_cost/stats_collector.rb', line 12 def log pp @stats end |
#push(request) ⇒ Object
7 8 9 10 |
# File 'lib/action_cost/stats_collector.rb', line 7 def push(request) ca = controller_action_string(request) add_request(ca, request.operation_stats, request.table_stats) end |