Revision 597

Date:
2016/10/19 10:34:26
Author:
ahitrov
Revision Log:
Components timing available in production. Components timing writes data to error_log.

Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/conf/mason/handler.pl.proto

     
    74 74 use locale;
    75 75 my $_comm = $_comments{$r->content_type};
    76 76 my $s_time_ = [Time::HiRes::gettimeofday];
    77 warn "Start: ".$m->current_comp->path."\n";
    77 78 if ($_comm) {
    78 79 $m->out("\n".$$_comm[0]." ".$m->current_comp->path.":\tStart t: ".Time::HiRes::time." ".$$_comm[1]."\n");
    79 80 }|;
    80 81 $ah_args{postamble} = q|
    82 warn "Timing: ".$m->current_comp->path.":\t".sprintf('%.1f ms', Time::HiRes::tv_interval($s_time_) * 1000)."\n";
    81 83 if ($_comm) {
    82 84 $m->out("\n".$$_comm[0]." ".$m->current_comp->path.":\tFinish t: ".Time::HiRes::time.", w: ".sprintf('%.4f', Time::HiRes::tv_interval($s_time_))." ".$$_comm[1]."\n");
    83 85 }|;
     
    87 89 |;
    88 90 }
    89 91 } else {
    90 $ah_args{preamble} = q|
    92 if (lc '@COMP_TIMINGS_DISABLE@' ne 'yes') {
    93 $ah_args{preamble} = q|
    91 94 use locale;
    92 |;
    95 my $s_time_ = [Time::HiRes::gettimeofday];
    96 |;
    97 $ah_args{postamble} = q|
    98 warn "Timing: ".$m->current_comp->path.":\t".sprintf('%.1f ms', Time::HiRes::tv_interval($s_time_) * 1000)."\n";
    99 |;
    100 } else {
    101 $ah_args{preamble} = q|
    102 use locale;
    103 |;
    104 }
    93 105 $ah_args{error_mode} = lc('@ERROR_MODE@') eq 'output' ? 'output':'fatal';
    94 106 $ah_args{preloads} = [qw(@PRELOADS@)];
    95 107 if (lc('@STATIC_SOURCE_ENABLE@') eq 'yes') {
  • utf8/core/project-default.mk

     
    167 167 MASON_MEMCACHED_ENABLED ?= NO
    168 168 MASON_MEMCACHED_NAMESPACE ?= ${PROJECT}:${PROJECT_VERSION}
    169 169 MASON_MEMCACHED_SERVERS ?=
    170 COMP_TIMINGS_DISABLE ?= YES
    170 171
    171 172 # overrides
    172 173 ifeq (${DB_TYPE},SINGLE)