The Pablo Java Performance Capture Facility (Java PCF) is a set of Java classes that can be substituted for the Java classes FileInputStream, FileOutputStream, FileReader, FileWriter and RandomAccessFile so that I/O performance data in Java codes can be captured and measured. These programs perform exactly the same functions as their standard counterparts, but they have been augmented by instrumentation software, attached before and after the call itself, to capture internal data. Programmers compile their instrumented source code linked it with the PabloIOTracing.jar Java archive, then execute in the normal manner. During program execution, performance data captured by the instrumentation is recorded in SDDF trace files. Each operation of the instrumented classes is then recorded. This allows the user to analyze the I/O behavior of the application over time..
In profiling the performance of an application's I/O behavior, the Java PCF can be used to capture performance metrics for the FileInputStream, FIleOutputStream, FileReader, FileWriter and RandomAccessFile classes during program execution. An event, in this context, occurs each time a method in these classes is invoked that performs disk I/O.
import PabloIOTracing.*;
PabloTracer pt = PabloTracer("C:/MyJavaFolder/myTraceFile",procNumber);
Output will be generated in the file C:/MyJavaFolder/myTraceFile.p where p is the value of procNumber in the declaration. The code can then be built in the usual manor using javac or NetBeans.
pt.end();
Failure to make this call will result in an incomplete trace.
Select from the following links for examples of Java code before and after I/O instrumentation.
Sample Java Code Before Pablo I/O Instrumentation
Sample Java Code After Pablo I/O Instrumentation