← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 18:42:36 2015
Reported on Fri Jul 31 18:48:16 2015

Filename/var/www/foswikidev/core/lib/Foswiki/Serialise/Simplified.pm
StatementsExecuted 14 statements in 257µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11115µs28µsFoswiki::Serialise::Simplified::::BEGIN@13Foswiki::Serialise::Simplified::BEGIN@13
11111µs11µsFoswiki::Serialise::Simplified::::BEGIN@15Foswiki::Serialise::Simplified::BEGIN@15
11110µs14µsFoswiki::Serialise::Simplified::::BEGIN@14Foswiki::Serialise::Simplified::BEGIN@14
1119µs9µsFoswiki::Serialise::Simplified::::newFoswiki::Serialise::Simplified::new
1113µs3µsFoswiki::Serialise::Simplified::::writeFoswiki::Serialise::Simplified::write
0000s0sFoswiki::Serialise::Simplified::::readFoswiki::Serialise::Simplified::read
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# See bottom of file for license and copyright information
2
3=begin TML
4
5---+ package Foswiki::Serialise::Simplified
6
7This is the style=perl serialiseation used by System.VarQUERY
8
9=cut
10
11package Foswiki::Serialise::Simplified;
12
13230µs241µs
# spent 28µs (15+13) within Foswiki::Serialise::Simplified::BEGIN@13 which was called: # once (15µs+13µs) by Foswiki::Serialise::_getSerialiser at line 13
use strict;
# spent 28µs making 1 call to Foswiki::Serialise::Simplified::BEGIN@13 # spent 13µs making 1 call to strict::import
14224µs218µs
# spent 14µs (10+4) within Foswiki::Serialise::Simplified::BEGIN@14 which was called: # once (10µs+4µs) by Foswiki::Serialise::_getSerialiser at line 14
use warnings;
# spent 14µs making 1 call to Foswiki::Serialise::Simplified::BEGIN@14 # spent 4µs making 1 call to warnings::import
152182µs111µs
# spent 11µs within Foswiki::Serialise::Simplified::BEGIN@15 which was called: # once (11µs+0s) by Foswiki::Serialise::_getSerialiser at line 15
use Foswiki::Serialise;
# spent 11µs making 1 call to Foswiki::Serialise::Simplified::BEGIN@15
16
17=begin TML
18
19---++ ClassMethod new( $class, ) -> $cereal
20
21=cut
22
23
# spent 9µs within Foswiki::Serialise::Simplified::new which was called: # once (9µs+0s) by Foswiki::Serialise::_getSerialiser at line 78 of /var/www/foswikidev/core/lib/Foswiki/Serialise.pm
sub new {
241500ns my $class = shift;
2516µs my $this = bless( {}, $class );
2615µs return $this;
27}
28
29# Default serialiser for QUERY
30
# spent 3µs within Foswiki::Serialise::Simplified::write which was called: # once (3µs+0s) by Foswiki::Serialise::serialise at line 37 of /var/www/foswikidev/core/lib/Foswiki/Serialise.pm
sub write {
311300ns my $module = shift;
321800ns my ($result) = @_;
331600ns if ( ref($result) eq 'ARRAY' ) {
34
35 # If any of the results is non-scalar, have to perl it
36 foreach my $v (@$result) {
37 if ( ref($v) ) {
38 return Foswiki::Serialise::serialise( $result, 'Perl' );
39 }
40 }
41 return join( ',', @$result );
42 }
43 elsif ( ref($result) ) {
44 return Foswiki::Serialise::serialise( $result, 'Perl' );
45 }
46 else {
4715µs return defined $result ? $result : '';
48 }
49}
50
51sub read {
52 my $module = shift;
53 die 'not implemented';
54}
55
5612µs1;
57__END__