Permalink
Browse files

Remove timing debug prints, put timing markpoints (normalized to 1.0

seconds) into the source.
  • Loading branch information...
jamiemccarthy committed Feb 2, 2004
1 parent cca0d2c commit 53baf1d90e3a52359330ce8d1e49f23604e69019
Showing with 7 additions and 8 deletions.
  1. +7 −8 themes/slashcode/htdocs/index.pl
@@ -109,19 +109,19 @@ sub main {
return do_rss($reader, $constants, $user, $form, $stories, $section) if $rss;
printf STDERR scalar(localtime) . " index.pl $$ preheader %5.3f\n", (Time::HiRes::time - $start_time);
my $title = getData('head', { section => $section });
header($title, $section->{section}) or return;
printf STDERR scalar(localtime) . " index.pl $$ header %5.3f\n", (Time::HiRes::time - $start_time);
# TIMING MARKPOINT
# Median 0.090 seconds, 90th percentile 0.145 seconds
# displayStories() pops stories off the front of the @$stories array.
# Whatever's left is fed to displayStandardBlocks for use in the
# index_more block (aka Older Stuff).
$Stories = displayStories($stories);
printf STDERR scalar(localtime) . " index.pl $$ displayStories %5.3f\n", (Time::HiRes::time - $start_time);
# TIMING MARKPOINT
# Median 0.437 seconds, 90th percentile 1.078 seconds
my($first_date, $last_date) = ($stories->[0]{time}, $stories->[-1]{time});
$first_date =~ s/(\d\d\d\d)-(\d\d)-(\d\d).*$/$1$2$3/;
@@ -131,7 +131,8 @@ sub main {
{ first_date => $first_date, last_date => $last_date }
);
printf STDERR scalar(localtime) . " index.pl $$ displayStandardBlocks %5.3f\n", (Time::HiRes::time - $start_time);
# TIMING MARKPOINT
# Median 0.235 seconds, 90th percentile 0.513 seconds
slashDisplay('index', {
metamod_elig => scalar $reader->metamodEligible($user),
@@ -140,10 +141,8 @@ sub main {
boxes => $StandardBlocks,
});
printf STDERR scalar(localtime) . " index.pl $$ slashDisplay %5.3f\n", (Time::HiRes::time - $start_time);
# TIMING MARKPOINT
# Median 0.814 seconds, 90th percentile 1.551 seconds
# Median 0.052 seconds, 90th percentile 0.084 seconds
footer();

0 comments on commit 53baf1d

Please sign in to comment.