class Airbrake::PerformanceBreakdown
PerformanceBreakdown
holds data that shows how much time a request spent doing certaing subtasks such as (DB querying, view rendering, etc).
@see Airbrake.notify_breakdown @api public @since v4.2.0 rubocop:disable Metrics/ParameterLists
Attributes
end_time[RW]
groups[RW]
method[RW]
response_type[RW]
route[RW]
start_time[RW]
time[RW]
timing[RW]
Public Class Methods
new( method:, route:, response_type:, groups:, start_time: Time.now, end_time: start_time + 1, timing: nil, time: Time.now )
click to toggle source
# File lib/airbrake-ruby/performance_breakdown.rb, line 18 def initialize( method:, route:, response_type:, groups:, start_time: Time.now, end_time: start_time + 1, timing: nil, time: Time.now ) @time_utc = TimeTruncate.utc_truncate_minutes(time) @method = method @route = route @response_type = response_type @groups = groups @start_time = start_time @end_time = end_time @timing = timing @time = time end
Public Instance Methods
cargo()
click to toggle source
# File lib/airbrake-ruby/performance_breakdown.rb, line 43 def cargo 'routes' end
destination()
click to toggle source
# File lib/airbrake-ruby/performance_breakdown.rb, line 39 def destination 'routes-breakdowns' end
to_h()
click to toggle source
# File lib/airbrake-ruby/performance_breakdown.rb, line 47 def to_h { 'method' => method, 'route' => route, 'responseType' => response_type, 'time' => @time_utc, }.delete_if { |_key, val| val.nil? } end