Class: Aikido::Zen::Collector::Routes::Record Private
- Inherits:
-
Struct
- Object
- Struct
- Aikido::Zen::Collector::Routes::Record
- Defined in:
- lib/aikido/zen/collector/routes.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
-
#hits ⇒ Object
Returns the value of attribute hits.
-
#samples ⇒ Object
Returns the value of attribute samples.
-
#schema ⇒ Object
Returns the value of attribute schema.
Instance Method Summary collapse
- #increment(request) ⇒ Object private
-
#initialize(config = Aikido::Zen.config) ⇒ Record
constructor
private
A new instance of Record.
Constructor Details
#initialize(config = Aikido::Zen.config) ⇒ Record
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Record.
45 46 47 48 |
# File 'lib/aikido/zen/collector/routes.rb', line 45 def initialize(config = Aikido::Zen.config) super(0, Aikido::Zen::Request::Schema::EMPTY_SCHEMA, 0) @config = config end |
Instance Attribute Details
#hits ⇒ Object
Returns the value of attribute hits
44 45 46 |
# File 'lib/aikido/zen/collector/routes.rb', line 44 def hits @hits end |
#samples ⇒ Object
Returns the value of attribute samples
44 45 46 |
# File 'lib/aikido/zen/collector/routes.rb', line 44 def samples @samples end |
#schema ⇒ Object
Returns the value of attribute schema
44 45 46 |
# File 'lib/aikido/zen/collector/routes.rb', line 44 def schema @schema end |
Instance Method Details
#increment(request) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52 53 54 55 56 57 |
# File 'lib/aikido/zen/collector/routes.rb', line 50 def increment(request) self.hits += 1 if sample_schema? self.samples += 1 self.schema |= request.schema end end |