NAME
NetServer::ProcessTop - Make event loop statistics easily available
SYNOPSIS
use NetServer::ProcessTop;
warn "NetServer::ProcessTop listening on port ".(7000+($$ % 1000))."\n";
DESCRIPTION
This module implements a top
-like server that makes it easier to debug complicated event loops.
All statistics collected by Event are displayed in a format similar to the popular (and excellent) top
program. ProcessTop server listens on port 7000+($$%1000) by default.
PRECISE STAT DEFINITIONS
idle
Idle tracks the amount of time that the process cooperatively reliquished control to the operating system. (Usually via select or poll.)
other processes
Attempts to estimate the process's non-idle time that the operating system instead gave to other processes. (Actual clock time minus the combined total time spent in idle and in running event handlers.) This stat is an underestimate (lower bound) since the process can also be preemptively interrupted during event processing.
lag
Lag is the percent over the planned amount of time that the event loop took to complete. ((Actual time - planned time) / planned time)
It is unfortunately that more intuitive stats are not available. Benchmarking is a slippery business. If you have ideas for improvements, don't be shy!
SCREENSHOT
pl/3bork [12836 @ eq1062] 12:15:18 [ 15s]
21 events (6 zombies); load averages: 0.33, 0.32, 0.32
EID PRI STATE RAN TIME CPU TYPE DESCRIPTION P1
0 8 sleep 247 0:09 66.7% sys idle
24 4 sleep 105 0:04 28.1% idle QSGTable sweep
3 4 sleep 15 0:00 2.4% time server status
22 4 sleep 15 0:00 1.8% time QSGTable
12 4 cpu 4 0:00 0.8% time NetServer::ProcessTop::Client localhost
23 4 sleep 15 0:00 0.1% time QSGTable Detail
2 4 sleep 15 0:00 0.0% time Qt
7 4 sleep 8 0:00 0.0% time ObjStore::Serve checkpoint
10 4 sleep 8 0:00 0.0% time SSL items
9 4 sleep 8 0:00 0.0% time SSL service
6 -1 sleep 5 0:00 0.0% time Event::Stats
21 4 zomb 0 0:00 0.0% idle QSGTable sweep
19 4 zomb 0 0:00 0.0% time QSGTable
11 4 sleep 0 0:00 0.0% io NetServer::ProcessTop::Client localhost
8 4 sleep 0 0:00 0.0% io SSL
13 4 zomb 0 0:00 0.0% time QSGTable
BUGS
The potential impact of multiple CPUs and kernel-level thread support is ignored.
SUPPORT
The best place for questions about this extension is perl-loop@perl.org.
If you wish to subscribe to this mailing list, send email to majordomo@perl.org.
COPYRIGHT
Copyright © 1998 Joshua Nathaniel Pritikin. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 494:
Non-ASCII character seen before =encoding in '©'. Assuming CP1252