Module: tools Branch: master Commit: a1b547a37ce2cb7fac89e76344f1a4841738e09d URL: https://source.winehq.org/git/tools.git/?a=commit;h=a1b547a37ce2cb7fac89e763...
Author: Francois Gouget fgouget@codeweavers.com Date: Fri Nov 8 10:52:41 2019 +0100
testbot/web: Trace how long it takes to generate the JobDetails page.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/web/JobDetails.pl | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index fc98e14..a59fa00 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -31,6 +31,7 @@ use URI::Escape;
use WineTestBot::Config; use WineTestBot::Jobs; +use WineTestBot::Log; # For Elapsed() use WineTestBot::LogUtils; use WineTestBot::Missions; use WineTestBot::StepsTasks; @@ -41,6 +42,7 @@ use WineTestBot::Engine::Notify; sub _initialize($$$) { my ($self, $Request, $RequiredRole) = @_; + $self->{start} = Time();
my $JobId = $self->GetParam("Key"); if (! defined($JobId)) @@ -645,6 +647,12 @@ sub GenerateDataCell($$$$$) } }
+sub GenerateFooter($) +{ + my ($self) = @_; + print "<p class='GeneralFooterText'>Generated in ", Elapsed($self->{start}), " s</p>\n"; +} +
package main;