Revision: 1234
Author: tim.bunce
Date: Wed May 26 10:30:40 2010
Log: Include app name in title of index page.

http://code.google.com/p/perl-devel-nytprof/source/detail?r=1234

Modified:
 /trunk/bin/nytprofhtml

=======================================
--- /trunk/bin/nytprofhtml      Fri Apr 30 14:39:05 2010
+++ /trunk/bin/nytprofhtml      Wed May 26 10:30:40 2010
@@ -633,7 +633,11 @@
     open my $fh, '>', "$opt_out/$filename"
         or croak "Unable to open file $opt_out/$filename: $!";

-    print $fh get_html_header();
+    my $application = $profile->{attribute}{application};
+    (my $app = $application) =~ s:.*/::; # basename
+    $app =~ s/ .*//;
+
+    print $fh get_html_header("Index of $app NYTProf Profile");
print $fh get_page_header(profile => $profile, title => "Performance Profile Index", skip_link_to_index=>1);
     print $fh qq{
         <div class="body_content"><br />
@@ -643,8 +647,7 @@
     my @all_fileinfos = $profile->all_fileinfos;
     my $eval_fileinfos = $profile->eval_fileinfos;
     my $summary = sprintf "Profile of %s for %s,",
-        $profile->{attribute}{application},
-        fmt_time($profile->{attribute}{profiler_duration});
+        $application, fmt_time($profile->{attribute}{profiler_duration});
     $summary .= sprintf " executing %d statements",
          $profile->{attribute}{total_stmts_measured}
         -$profile->{attribute}{total_stmts_discounted};

--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]

Reply via email to