]> Lady’s Gitweb - Gitweb/commit
gitweb: Add optional "time to generate page" info in footer
authorJakub Narebski <redacted>
Tue, 1 Sep 2009 11:39:16 +0000 (13:39 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:50:39 +0000 (00:50 -0400)
commite546798785150d144b0d1d8048ecdf8573383eb92ae6d16fb0c3217040ca4a8d
tree1bd381bb5b4619891f03277ac64ebf0a437fc14e9fcc13f20e02b699e5b1dede
parentc68ca2ee4aa7dea78eecace683995280c89618f6970bf7d74c88342ef47f73c8
gitweb: Add optional "time to generate page" info in footer

Add "This page took XXX seconds and Y git commands to generate"
to page footer, if global feature 'timed' is enabled (disabled
by default).  Requires Time::HiRes installed for high precision
'wallclock' time.

Note that Time::HiRes is being required unconditionally; this is
because setting $t0 variable needs to be done fairly early to have
running time of the whole script.  If Time::HiRes module were required
only if 'timed' feature is enabled, the earliest place where starting
time ($t0) could be calculated would be after reading gitweb config,
making "time to generate page" info inaccurate.

This code is based on example code by Petr 'Pasky' Baudis.

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.css
gitweb.perl
This page took 0.319702 seconds and 4 git commands to generate.