Class: Peek::Views::BulletDetailed

Inherits:
DetailedView show all
Defined in:
lib/peek/views/bullet_detailed.rb

Constant Summary collapse

WARNING_MESSAGE =
"Unoptimized queries detected"

Instance Method Summary collapse

Methods inherited from DetailedView

#detail_store, thresholds

Instance Method Details

#keyObject


8
9
10
# File 'lib/peek/views/bullet_detailed.rb', line 8

def key
  'bullet'
end

#resultsObject


12
13
14
15
16
17
18
19
20
21
# File 'lib/peek/views/bullet_detailed.rb', line 12

def results
  return {} unless ::Bullet.enable?
  return {} unless calls > 0

  {
    calls: calls,
    details: details,
    warnings: [WARNING_MESSAGE]
  }
end