Questions about Mojo::Log

36 views
Skip to first unread message

James Bearden

unread,
Jul 1, 2014, 5:10:13 PM7/1/14
to mojol...@googlegroups.com
Hello Folks,

Mojo::Log has this nice feature where when you set the logging level to debug it automatically prints out A) the status of the response and B) the time it took to process the request. My first question is, there are two times reported and there is zero documentation about it. I assume the first number reported is the total time to process the request, but what is the second number. The second question is, is there an easy way to display that information for higher log levels?

James

Jan Henning Thorsen

unread,
Jul 2, 2014, 8:35:36 AM7/2/14
to mojol...@googlegroups.com
Hi,

The first number is the total time, the second number is how many requests (of the same type) you could in theory process pr second. x/s = times pr second. Example:

 200 OK (0.000578s, 1730.104/s).

$req_pr_sec = 1 / 0.000578; # 1730.10380622837

You could use https://metacpan.org/pod/Mojolicious::Plugin::AccessLog to get your own format with a higher log level.
Reply all
Reply to author
Forward
0 new messages