Apache::Scoreboard problem
[prev]
[thread]
[next]
[Date index for 2005/03/02]
I'm trying to get some per-request stats for the entire request, not just the
response phase, and Apache::Scoreboard looked like it would do the job.
However, I'm having a few problems with it.
I have the following installed as a CleanupHandler (by which time everything
should be done), it's just test code to try out Apache::Scoreboard so I'm not
doing anything fancy with the data. As much as possible it's pulled straight
from the docs.
sub handler
{
my $r = shift;
my $sp = $r->pool->new;
my $image = Apache::Scoreboard->image($sp);
for (my $parent_score = $image->parent_score;
$parent_score;
$parent_score = $parent_score->next)
{
next unless ($parent_score->pid == $$); # only want this process
my $server = $parent_score->server; #Apache::ServerScore object
next unless $server;
warn "count: ", $server->access_count;
warn "request: ", $server->request;
warn "served: ", $server->bytes_served;
warn "conn_bytes : ", $server->conn_bytes ;
warn "conn_count : ", $server->conn_count ;
warn "req_time : ", $server->req_time ;
}
}
However, on use, I get the following:
Can't locate object method "server" via package
"Apache::ScoreboardParentScore"
According to the docs, that should be Apache::ParentScore not
Apache::ScoreboardParentScore.
I'm currently using: Apache/2.0.52, mod_perl 2.0.0_RC3 and Apache::Scoreboard
2.05.
Is there something obvious I'm doing wrong?
 |
Apache::Scoreboard problem
Malcolm J Harwood 18:22 on 02 Mar 2005
|