diff options
author | Bharat Mediratta <bharat@menalto.com> | 2013-01-24 18:14:14 -0500 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2013-01-24 18:14:14 -0500 |
commit | 86a2759062ee3dbf93f4c17c7499e3f506035047 (patch) | |
tree | 0ff04e06fbab1faec8c918a6828bec0297ba5538 /modules/gallery/controllers | |
parent | 727a595447ebd331db199f34620d7e037415b582 (diff) |
If profiling is enabled, dump out profiling data instead of proxied
images so that we can see how efficient our proxying is. Follow-on
for #1959.
Diffstat (limited to 'modules/gallery/controllers')
-rw-r--r-- | modules/gallery/controllers/file_proxy.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php index a9e98ce1..7e5d0038 100644 --- a/modules/gallery/controllers/file_proxy.php +++ b/modules/gallery/controllers/file_proxy.php @@ -129,6 +129,13 @@ class File_Proxy_Controller extends Controller { throw $e; } + if (gallery::show_profiler()) { + Profiler::enable(); + $profiler = new Profiler(); + $profiler->render(); + exit; + } + header("Content-Length: " . filesize($file)); header("Pragma:"); |