← Index
NYTProf Performance Profile   « line view »
For webmerge/scripts/webmerge.pl
  Run on Mon Oct 7 02:42:42 2013
Reported on Mon Oct 7 03:03:25 2013

Filename/home/ocbnet/domain/ocbnet.ch/vhost/webmerge/htdocs/webmerge/scripts/modules/RTP/Webmerge/Optimize/ZIP.pm
StatementsExecuted 20 statements in 2.12ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11189µs351µsRTP::Webmerge::Optimize::ZIP::::BEGIN@8RTP::Webmerge::Optimize::ZIP::BEGIN@8
11155µs786µsRTP::Webmerge::Optimize::ZIP::::BEGIN@29RTP::Webmerge::Optimize::ZIP::BEGIN@29
11154µs86µsRTP::Webmerge::Optimize::ZIP::::BEGIN@10RTP::Webmerge::Optimize::ZIP::BEGIN@10
11151µs138µsRTP::Webmerge::Optimize::ZIP::::BEGIN@9RTP::Webmerge::Optimize::ZIP::BEGIN@9
11144µs44µsRTP::Webmerge::Optimize::ZIP::::BEGIN@16RTP::Webmerge::Optimize::ZIP::BEGIN@16
11125µs25µsRTP::Webmerge::Optimize::ZIP::::__ANON__[:47]RTP::Webmerge::Optimize::ZIP::__ANON__[:47]
11123µs23µsRTP::Webmerge::Optimize::ZIP::::BEGIN@24RTP::Webmerge::Optimize::ZIP::BEGIN@24
11121µs21µsRTP::Webmerge::Optimize::ZIP::::__ANON__[:72]RTP::Webmerge::Optimize::ZIP::__ANON__[:72]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1###################################################################################################
2# Copyright 2013 by Marcel Greter
3# This file is part of Webmerge (GPL3)
4###################################################################################################
5package RTP::Webmerge::Optimize::ZIP;
6###################################################################################################
7
82162µs2613µs
# spent 351µs (89+262) within RTP::Webmerge::Optimize::ZIP::BEGIN@8 which was called: # once (89µs+262µs) by main::BEGIN@51 at line 8
use Carp;
# spent 351µs making 1 call to RTP::Webmerge::Optimize::ZIP::BEGIN@8 # spent 262µs making 1 call to Exporter::import
92144µs2224µs
# spent 138µs (51+87) within RTP::Webmerge::Optimize::ZIP::BEGIN@9 which was called: # once (51µs+87µs) by main::BEGIN@51 at line 9
use strict;
# spent 138µs making 1 call to RTP::Webmerge::Optimize::ZIP::BEGIN@9 # spent 87µs making 1 call to strict::import
102263µs2117µs
# spent 86µs (54+31) within RTP::Webmerge::Optimize::ZIP::BEGIN@10 which was called: # once (54µs+31µs) by main::BEGIN@51 at line 10
use warnings;
# spent 86µs making 1 call to RTP::Webmerge::Optimize::ZIP::BEGIN@10 # spent 31µs making 1 call to warnings::import
11
12###################################################################################################
13
14# setup some global settings
15BEGIN
16
# spent 44µs within RTP::Webmerge::Optimize::ZIP::BEGIN@16 which was called: # once (44µs+0s) by main::BEGIN@51 at line 19
{
17 # enable (or disable) different optimizer executables
18149µs $ENV{'WEBMERGE_ADVZIP'} = 1 unless exists $ENV{'WEBMERGE_ADVZIP'};
191140µs144µs}
# spent 44µs making 1 call to RTP::Webmerge::Optimize::ZIP::BEGIN@16
20
21###################################################################################################
22
23# define our version string
241172µs123µs
# spent 23µs within RTP::Webmerge::Optimize::ZIP::BEGIN@24 which was called: # once (23µs+0s) by main::BEGIN@51 at line 24
BEGIN { $RTP::Webmerge::Optimize::ZIP::VERSION = "0.70" }
# spent 23µs making 1 call to RTP::Webmerge::Optimize::ZIP::BEGIN@24
25
26###################################################################################################
27
28# load webmberge module variables to hook into
2921.05ms21.52ms
# spent 786µs (55+732) within RTP::Webmerge::Optimize::ZIP::BEGIN@29 which was called: # once (55µs+732µs) by main::BEGIN@51 at line 29
use RTP::Webmerge qw(@initers @checkers %executables range);
# spent 786µs making 1 call to RTP::Webmerge::Optimize::ZIP::BEGIN@29 # spent 732µs making 1 call to Exporter::import
30
31###################################################################################################
32
33# push to initers
34# return for getOpts
35push @initers, sub
36
# spent 25µs within RTP::Webmerge::Optimize::ZIP::__ANON__[/home/ocbnet/domain/ocbnet.ch/vhost/webmerge/htdocs/webmerge/scripts/modules/RTP/Webmerge/Optimize/ZIP.pm:47] which was called: # once (25µs+0s) by RTP::Webmerge::initConfig at line 263 of webmerge/scripts/modules/RTP/Webmerge.pm
{
37
38 # get config
3914µs my ($config) = @_;
40
41 # create config variable to be available
4214µs $config->{'optimize-zip'} = undef;
43
44 # connect each tmpl variable with the getOpt option
45128µs return ('optimize-zip|zip!', \ $config->{'cmd_optimize-zip'});
46
47116µs};
48# EO push initer
49
50###################################################################################################
51
52# push to checkers
53push @checkers, sub
54
# spent 21µs within RTP::Webmerge::Optimize::ZIP::__ANON__[/home/ocbnet/domain/ocbnet.ch/vhost/webmerge/htdocs/webmerge/scripts/modules/RTP/Webmerge/Optimize/ZIP.pm:72] which was called: # once (21µs+0s) by RTP::Webmerge::checkConfig at line 290 of webmerge/scripts/modules/RTP/Webmerge.pm
{
55
56 # get config
5713µs my ($config) = @_;
58
59 # disable if not optimizing
6016µs unless ($config->{'optimize'})
61 { $config->{'optimize-zip'} = 0; }
62
63 # do nothing if feature is disabled
64124µs return unless $config->{'optimize-zip'};
65
66 # get the optimization level (1 to 4)
67 my $lvl = '-' . range($config->{'level'}, 1, 5, 4);
68
69 # define executables to optimize zips
70 $executables{'advzip'} = ['zipopt', "-z $lvl -q \"%s\"", 2] if $ENV{'WEBMERGE_ADVZIP'};
71
72112µs};
73# EO push checker
74
75###################################################################################################
76
77# now create a new file optimizer subroutine and hook it into our optimizers
78120µs135µs$RTP::Webmerge::Optimize::optimizer{'zip'} = RTP::Webmerge::Optimize::optimize('zip');
# spent 35µs making 1 call to RTP::Webmerge::Optimize::optimize
79
80###################################################################################################
81###################################################################################################
82121µs1;