You are here: Foswiki>Tasks Web>Item13792 (23 Nov 2015, GeorgeClark)Edit Attach

Item13792: Backport profiling api in Request.pm to 1.1.x.

pencil
Priority: Enhancement
Current State: Closed
Released In: 1.1.10
Target Release: patch
Applies To: Engine
Component: FoswikiRequest
Branches: Release01x01
Reported By: MichaelDaum
Waiting For:
Last Change By: GeorgeClark
... required for PiwikPlugin on 1.1.x

--- Release01x01/core/lib/Foswiki/Request.pm    2013-02-27 16:05:09.126716402 +0100
+++ foswiki/lib/Foswiki/Request.pm      2014-05-27 15:51:11.000000000 +0200
@@ -36,6 +36,16 @@
 use Error    ();
 use IO::File ();
 use CGI::Util qw(rearrange);
+use Time::HiRes ();
+
+sub getTime {
+    my $this     = shift;
+    my $endTime  = [Time::HiRes::gettimeofday];
+    my $timeDiff = Time::HiRes::tv_interval( $this->{start_time}, $endTime );
+    return $timeDiff;
+}
+
+

 =begin TML

@@ -69,6 +79,7 @@
         remote_user    => undef,
         secure         => 0,
         server_port    => undef,
+        start_time     => [Time::HiRes::gettimeofday],
         uploads        => {},
         uri            => '',
     };

-- MichaelDaum - 05 Oct 2015

 

ItemTemplate edit

Summary Backport profiling api in Request.pm to 1.1.x.
ReportedBy MichaelDaum
Codebase 1.1.9
SVN Range
AppliesTo Engine
Component FoswikiRequest
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins distro:f3bce1a30812
TargetRelease patch
ReleasedIn 1.1.10
CheckinsOnBranches Release01x01
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins distro:f3bce1a30812
Topic revision: r4 - 23 Nov 2015, GeorgeClark - This page was cached on 17 Feb 2017 - 04:11.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License