Francois Gouget : testbot/web: Trace how long it takes to generate the JobDetails page.
Alexandre Julliard
julliard at winehq.org
Fri Nov 8 11:14:26 CST 2019
Module: tools
Branch: master
Commit: a1b547a37ce2cb7fac89e76344f1a4841738e09d
URL: https://source.winehq.org/git/tools.git/?a=commit;h=a1b547a37ce2cb7fac89e76344f1a4841738e09d
Author: Francois Gouget <fgouget at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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;
More information about the wine-cvs
mailing list