Permalink
Browse files

format req/sec

  • Loading branch information...
1 parent 1bc86c7 commit 699228f04a6bb36e6a0fc42131965d2b76e6bd05 @cho45 committed May 19, 2010
Showing with 2 additions and 22 deletions.
  1. +2 −22 lib/Plack/Middleware/ServerStatus.pm
@@ -181,6 +181,8 @@ sub _handle_server_status {
my ($day, $hour, $min, $sec) = ($uptime =~ /(?:(\d+)-)?(?:(\d+):)?(?:(\d+):)?(\d+)/);
my $uptime_sec = _uptime_sec($uptime);
+ $avg_req_per_sec = sprintf('%.2f', $avg_req_per_sec);
+
if ($env->{QUERY_STRING} eq 'auto') {
[ 200, ['Content-Type' => 'text/plain'], [
"Total Accesses: $total_accesses\n",
@@ -251,27 +253,5 @@ sub _uptime_sec {
1;
__END__
-=head1 NAME
-
-Plack::Middleware::ServerStatus -
-
-=head1 SYNOPSIS
-
- use Plack::Middleware::ServerStatus;
-
-=head1 DESCRIPTION
-
-Plack::Middleware::ServerStatus is
-
-=head1 AUTHOR
-
-cho45 E<lt>cho45@lowreal.netE<gt>
-
-=head1 SEE ALSO
-
-=head1 LICENSE
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-=cut

0 comments on commit 699228f

Please sign in to comment.