Net::Analysis::Listener::HTTPClientPerf - analysis of client performance
Listens for: tcp_packet tcp_session_start tcp_session_end http_transaction
No events are emitted.
Generate a pretty PostScript file with HTTP sessions, requests and packets shown along a time axis. It is geared towards TCP sessions arising over a short time span (say, <40s) originating from a single browser.
v - verbosity tsnap=NN - the width of each packet column, in microseonds. Larger values compress the graph; packet columns become taller. Defaults to 25000ms. show_all_packets - plot non-data packets as well as data packets file - output filename pdf - whether to exec `gs -sDEVICE=pdfwrite -sOUTPUTFILE=out.pdf` ggv - whether to auto-invoke ggv on the output
We listen to the
http_transaction events, and build up a data structure designed for a graphical report.
Each time we see
tcp_sesssion_start, we start up a new session box. In this box, we build a packet histogram over time, as
tcp_packet events are seen. The
tsnap setting defines the time window; any packets for that session that flow within the window are added together. At the end, each window will contain a count of the packets, and also counts for the different classes (data vs. duplicates vs. non-data, etc).
As we see
http_transaction events, we classify them based on their headers. A record of the times, and class, of each transaction is added to the session box.
When the session box is closed, we run through the various histograms, and assign each set of counters a HTTP classification based on which http transaction event their time lies within (e.g. request, response). We then run through the http transaction list and insert req_start,req_stop, resp_start, and resp_stop timings into the histogram sequence.
At this point, for each session we now have a time-ordered sequence of http event timings, and fully classified packet histograms.
We now do a quick check over all the session boxes, to get scales for the axes. Horiztonal is time; vertical is number of packets. We draw the axes, and also any relevant graph furniture.
Then draw all the boxes. Sessions are stacked where they are concurrent; else they are fitted in, to give a sense of the number of concurrent sessions that were used during the request.
Better autoscaling of time axis; tsnap should be fully automatic
Output SVG instead of PostScript.
Incorporate DNS lookups.
Net::Analysis - the framework this module sits on.
Adam B. Worrall, <email@example.com>
Copyright (C) 2004 by Adam B. Worrall
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.