mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
Correctly track hijacked requests
This commit is contained in:
@ -25,8 +25,14 @@ class MethodProfiler
|
||||
klass.class_eval patches
|
||||
end
|
||||
|
||||
def self.start
|
||||
Thread.current[:_method_profiler] = {
|
||||
def self.transfer
|
||||
result = Thread.current[:_method_profiler]
|
||||
Thread.current[:_method_profiler] = nil
|
||||
result
|
||||
end
|
||||
|
||||
def self.start(transfer = nil)
|
||||
Thread.current[:_method_profiler] = transfer || {
|
||||
__start: Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
||||
}
|
||||
end
|
||||
|
Reference in New Issue
Block a user