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