From 2d83f3c0d1562229347b8c7d21f21765db413d94 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 11 Sep 2012 16:42:43 -0700 Subject: [PATCH] Add the same kind of performance data for Shortcuts, as AssetProxy macros. --- lib/WebGUI/Asset/Shortcut.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Asset/Shortcut.pm b/lib/WebGUI/Asset/Shortcut.pm index 3929d1a6c..8bb0449ad 100644 --- a/lib/WebGUI/Asset/Shortcut.pm +++ b/lib/WebGUI/Asset/Shortcut.pm @@ -942,7 +942,10 @@ sub view { # Make sure the www_view method won't be skipped b/c the asset is cached. $shortcut->purgeCache(); - $content = $shortcut->view; + my $t = ($self->session->log->canShowPerformanceIndicators()) ? [Time::HiRes::gettimeofday()] : undef; + $content = $shortcut->view; + $content .= "Shortcut:" . Time::HiRes::tv_interval($t) + if $t; # Make sure the overrides are not cached by the original asset. $shortcut->purgeCache();