Skip Menu |

This queue is for tickets about the Catalyst CPAN distribution.

Report information
The Basics
Id: 127375
Status: new
Priority: 0/
Queue: Catalyst

People
Owner: Nobody in particular
Requestors: rrwo [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [RFE] move the code for outputting stats report to a separate method
Date: Tue, 16 Oct 2018 12:44:12 +0100
To: bug-Catalyst [...] rt.cpan.org
From: Robert Rothenberg <rrwo [...] cpan.org>
The following code should be moved outside from finalize into another method such as "log_stats_report" |    if| |(||$c||->use_stats) {| |||my| |$elapsed| |= ||$c||->stats->elapsed;| |||my| |$av| |= ||$elapsed| |== 0 ? ||'??'| |: ||sprintf| |'%.3f'||, 1 / ||$elapsed||;| |||$c||->||log||->info(| |||"Request took ${elapsed}s ($av/s)\n"| |. ||$c||->stats->report . ||"\n"| |);| |||} The reason is so that stats can be enabled but "logged" to a separate monitoring system, e.g. StatsD. |