lib/tracebin/patches/mysql2.rb in tracebin-0.0.10 vs lib/tracebin/patches/mysql2.rb in tracebin-0.0.11
- old
+ new
@@ -1,11 +1,11 @@
::Mysql2::Client.class_eval do
alias_method :query_without_tracebin, :query
def query(*args, &block)
- start_time = Time.now
+ start_time = ::Tracebin::PatchHelper.timestamp_string
result = query_without_tracebin(*args, &block)
- end_time = Time.now
+ end_time = ::Tracebin::PatchHelper.timestamp_string
event_data = [
'sql.mysql2_query',
start_time,
end_time,