| Measures time taken by each protocol to process a message. PERF has to be the top protocol in a stack. It
adds a special header to the message which travels with the message. Upon initialization,
PERF creates a ProtocolObserver for each protocol layer in the stack. That observer notes the time taken for a
message to travel through the layer it observes, and records the start time, end time and total time
in the message itself (in the header created by PERF). When a message is received by PERF, the statistics
for the message are appended to a file (or displayed in a GUI (not yet done)).
Because of different wall times between different machines, PERF should only be used for members
in the same JVM. For members in different processes, physical clocks have to be synchronized: if they are
only a few milliseconds aprt, the values will be incorrect.
For example, to write all performance data to a file, do the following:
- Set tracing to on, e.g.
trace=true in jgroups.properties
- Add a trace statement for PERF.up():
trace0=PERF.up DEBUG /tmp/trace.perf . This will write
all trace output to the given file.
author: Bela Ban Oct 2001 version: $Revision: 1.10.10.1 $ |