Class: NewRelic::Security::Agent::Control::EventStats
- Inherits:
-
Object
- Object
- NewRelic::Security::Agent::Control::EventStats
- Defined in:
- lib/newrelic_security/agent/control/event_stats.rb
Instance Attribute Summary collapse
-
#error_count ⇒ Object
Returns the value of attribute error_count.
-
#processed ⇒ Object
Returns the value of attribute processed.
-
#rejected ⇒ Object
Returns the value of attribute rejected.
-
#sent ⇒ Object
Returns the value of attribute sent.
Instance Method Summary collapse
-
#initialize ⇒ EventStats
constructor
A new instance of EventStats.
- #prepare_for_health_check ⇒ Object
Constructor Details
#initialize ⇒ EventStats
Returns a new instance of EventStats.
8 9 10 11 12 13 |
# File 'lib/newrelic_security/agent/control/event_stats.rb', line 8 def initialize @processed = NewRelic::Security::Agent::Control::EventCounter.new @sent = NewRelic::Security::Agent::Control::EventCounter.new @rejected = NewRelic::Security::Agent::Control::EventCounter.new @error_count = NewRelic::Security::Agent::Control::EventCounter.new end |
Instance Attribute Details
#error_count ⇒ Object
Returns the value of attribute error_count.
6 7 8 |
# File 'lib/newrelic_security/agent/control/event_stats.rb', line 6 def error_count @error_count end |
#processed ⇒ Object
Returns the value of attribute processed.
6 7 8 |
# File 'lib/newrelic_security/agent/control/event_stats.rb', line 6 def processed @processed end |
#rejected ⇒ Object
Returns the value of attribute rejected.
6 7 8 |
# File 'lib/newrelic_security/agent/control/event_stats.rb', line 6 def rejected @rejected end |
#sent ⇒ Object
Returns the value of attribute sent.
6 7 8 |
# File 'lib/newrelic_security/agent/control/event_stats.rb', line 6 def sent @sent end |
Instance Method Details
#prepare_for_health_check ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/newrelic_security/agent/control/event_stats.rb', line 15 def prepare_for_health_check hash = {} hash[:processed] = @processed.fetch_and_reset_counter hash[:sent] = @sent.fetch_and_reset_counter hash[:rejected] = @rejected.fetch_and_reset_counter hash[:errorCount] = @error_count.fetch_and_reset_counter hash end |