From 86a2759062ee3dbf93f4c17c7499e3f506035047 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 24 Jan 2013 18:14:14 -0500 Subject: 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. --- modules/gallery/controllers/file_proxy.php | 7 +++++++ 1 file changed, 7 insertions(+) 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:"); -- cgit v1.2.3