Sha256: 42c98ce3714a8c67dcaeb85d7c8969b37fe53925646730ed3c5c9e9f0409e411
Contents?: true
Size: 784 Bytes
Versions: 4
Compression:
Stored size: 784 Bytes
Contents
# frozen_string_literal: true module RailsMiniProfiler module ProfiledRequestsHelper include ApplicationHelper def formatted_duration(duration) duration = (duration.to_f / 100) duration < 1 ? duration : duration.round end def formatted_allocations(allocations) number_to_human(allocations, units: { unit: '', thousand: 'k', million: 'M', billion: 'B', trillion: 'T' }) end def trace_display_name(name) { 'sql.active_record': 'ActiveRecord Query', 'instantiation.active_record': 'ActiveRecord Instantiation', 'render_template.action_view': 'Render View', 'render_partial.action_view': 'Render Partial', 'process_action.action_controller': 'Controller' }[name.to_sym] end end end
Version data entries
4 entries across 4 versions & 1 rubygems