[Home]WikiPatches/LoadTime

UseModWiki | WikiPatches | RecentChanges | Preferences

it shows LoadTime? for each page.

The Patch

# Other global variables:
...
 - $ConfigError $UploadPattern $StartTime}
 + $ConfigError $UploadPattern $StartTime}

sub DoWikiRequest {
...
#       $ConfigError = T('Unknown Error (no error text)');
      }
    }
  }
  
 + if ($CheckTime) {
	+ eval "use Time::HiRes qw( usleep ualarm gettimeofday tv_interval )";
	+ if ($@) { 
		+ $CheckTime = 0; 
	+ } else {
		+ $StartTime = [gettimeofday()];
	+ }
  + }
You can choose GetMinimumFooter for location (preferably in accordance with WikiPatches/CommonMinimumFooter as follow)
sub GetMinimumFooter {
  my ($html);

  if ($FooterNote ne '') {
    $html .= T($FooterNote);
  }
  + if ($CheckTime) {
    + $html .= '<br>' . sprintf("%.6f",&tv_interval($StartTime)) . ' '. 's';
  + }
  $html .= $q->end_html;
  return $html;
}
In config file:

In Configuration:

$CheckTime    = 0;  # 1 = mesure the page-processing time (requires Time::HiRes module), 0 = do not 

Link

  1. In UseModKr http://gypark.pe.kr/wiki/UseModWiki소스수정/처리시간측정;
--JuanmaMP

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited July 13, 2009 1:27 am by JuanmaMP (diff)
Search: