Class: Peek::Views::ExternalHttp
- Inherits:
-
DetailedView
- Object
- View
- DetailedView
- Peek::Views::ExternalHttp
- Defined in:
- lib/peek/views/external_http.rb
Constant Summary collapse
- DEFAULT_THRESHOLDS =
{ calls: 10, duration: 1000, individual_call: 100 }.freeze
- THRESHOLDS =
{ production: { calls: 10, duration: 1000, individual_call: 100 } }.freeze
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from DetailedView
Class Method Details
.thresholds ⇒ Object
28 29 30 |
# File 'lib/peek/views/external_http.rb', line 28 def self.thresholds @thresholds ||= THRESHOLDS.fetch(Rails.env.to_sym, DEFAULT_THRESHOLDS) end |
Instance Method Details
#format_call_details(call) ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/peek/views/external_http.rb', line 32 def format_call_details(call) full_path = generate_path(call) super.merge( label: "#{call[:method]} #{full_path}", code: code(call), proxy: proxy(call), error: error(call) ) end |
#key ⇒ Object
20 21 22 |
# File 'lib/peek/views/external_http.rb', line 20 def key 'external-http' end |
#results ⇒ Object
24 25 26 |
# File 'lib/peek/views/external_http.rb', line 24 def results super.merge(calls: calls) end |