Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/mini_profiler/timer_struct/sql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def initialize(query, duration_ms, page, parent, params = nil, skip_backtrace =
stack_trace = "".dup
# Clean up the stack trace if there are options to do so
Kernel.caller.each do |ln|
ln.gsub!(Rack::MiniProfiler.config.backtrace_remove, '') if Rack::MiniProfiler.config.backtrace_remove && !full_backtrace
ln.sub!(Rack::MiniProfiler.config.backtrace_remove, '') if Rack::MiniProfiler.config.backtrace_remove && !full_backtrace

if full_backtrace ||
(
(
Expand All @@ -38,6 +39,7 @@ def initialize(query, duration_ms, page, parent, params = nil, skip_backtrace =
@parent = parent
@page = page
start_millis = ((Process.clock_gettime(Process::CLOCK_MONOTONIC) * 1000).to_i - page[:started]) - duration_ms

super(
execute_type: 3, # TODO
formatted_command_string: query ? ERB::Util.html_escape(query) : nil,
Expand Down