Class: RailsRequestStats::Stats::CacheStats
- Inherits:
-
Object
- Object
- RailsRequestStats::Stats::CacheStats
- Defined in:
- lib/rails_request_stats/stats/cache_stats.rb
Instance Attribute Summary collapse
-
#cache_hit_count_collection ⇒ Object
readonly
Returns the value of attribute cache_hit_count_collection.
-
#cache_read_count_collection ⇒ Object
readonly
Returns the value of attribute cache_read_count_collection.
Instance Method Summary collapse
- #add_stats(cache_read_count, cache_hit_count) ⇒ Object
-
#initialize ⇒ CacheStats
constructor
A new instance of CacheStats.
Constructor Details
#initialize ⇒ CacheStats
Returns a new instance of CacheStats.
7 8 9 10 |
# File 'lib/rails_request_stats/stats/cache_stats.rb', line 7 def initialize @cache_read_count_collection = [] @cache_hit_count_collection = [] end |
Instance Attribute Details
#cache_hit_count_collection ⇒ Object (readonly)
Returns the value of attribute cache_hit_count_collection.
5 6 7 |
# File 'lib/rails_request_stats/stats/cache_stats.rb', line 5 def cache_hit_count_collection @cache_hit_count_collection end |
#cache_read_count_collection ⇒ Object (readonly)
Returns the value of attribute cache_read_count_collection.
4 5 6 |
# File 'lib/rails_request_stats/stats/cache_stats.rb', line 4 def cache_read_count_collection @cache_read_count_collection end |
Instance Method Details
#add_stats(cache_read_count, cache_hit_count) ⇒ Object
12 13 14 15 |
# File 'lib/rails_request_stats/stats/cache_stats.rb', line 12 def add_stats(cache_read_count, cache_hit_count) @cache_read_count_collection << cache_read_count @cache_hit_count_collection << cache_hit_count end |