mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
correct tracking of x runtime
This commit is contained in:
parent
54dc191a91
commit
8bf91b8dca
1 changed files with 2 additions and 2 deletions
|
@ -138,8 +138,8 @@ class Middleware::RequestTracker
|
||||||
result = @app.call(env)
|
result = @app.call(env)
|
||||||
info = MethodProfiler.stop
|
info = MethodProfiler.stop
|
||||||
# possibly transferred?
|
# possibly transferred?
|
||||||
if info
|
if info && (headers = result[1])
|
||||||
env["X-Runtime"] = "%0.6f" % info[:total_duration]
|
headers["X-Runtime"] = "%0.6f" % info[:total_duration]
|
||||||
end
|
end
|
||||||
result
|
result
|
||||||
ensure
|
ensure
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue