Method: PgHero::Methods::QueryStats#slow_queries
- Defined in:
- lib/pghero/methods/query_stats.rb
#slow_queries(query_stats: nil, **options) ⇒ Object
170 171 172 173 |
# File 'lib/pghero/methods/query_stats.rb', line 170 def slow_queries(query_stats: nil, **) query_stats ||= self.query_stats(**) query_stats.select { |q| q[:calls].to_i >= slow_query_calls.to_i && q[:average_time].to_f >= slow_query_ms.to_f } end |