

NOTE: This file has been depricated.. Please see README.txt


Simple performance tools for Object Serialization:

OPerf - Times how long it takes to serialize an instance of classes
	specified on the command line.

	For each class it creates a ByteArrayOutputStream and a new
	ObjectOutputStream.  A new instance of the class is created.
	Timings are created for the first iteration and printed as 
	"cold" timings.  Then ten iterations are run with a new object
	and a new ObjectOutputStream.   The last run is used for to
	report the "warm" times. 

	Finally the bytearray of the serialized stream is written to
	<class>.tmp and is available for Input to IPerf.

IPerf - Times how long it takes to deserialize an instance of classes
	specified on the command line.

	For each class it creates a ByteArrayInputStream from the
	contents of the <class>.tmp file. The array is deserialized
	into an object.

	Timings are reported for the first iteration and printed as 
	"cold" timings.  Then ten iterations are run with a new object
	and a new ObjectInputStream.   The last run is used for to
	report the "warm" times. 


Several example classes have been created, some with variations for
whether they implement their own readObject and writeObject methods or
not, and whether the fields are in canonical order (sorted) or reverse
sorted.

T_10I	- 10 Integer fields, fields in order
TR_10I	- 10 Integer fields, fields in reverse order
TP_10I	- 10 Integer fields with readObject/writeObject methods

T_BT	- A binary tree with 127 nodes, default serialization
TP_BT	- A binary tree with 127 nodes, w/ readObject/writeObject methods

T_LL	- A linked list with 10 nodes
T_V	- A class with no fields




The script "run" can be used to invoke the current set of cases.

For example, the original timings before any tuning are:
% run
Running OPref on T_V T_V T_10I TP_10I TR_10I T_LL T_BT TP_BT
Cold:: T_V:	7 ms, 1 Classes, 1 Objects, 37 bytes written
Warm:: T_V:	1 ms, 1 Classes, 1 Objects, 37 bytes written
Cold:: T_V:	1 ms, 1 Classes, 1 Objects, 37 bytes written
Warm:: T_V:	0 ms, 1 Classes, 1 Objects, 37 bytes written
Cold:: T_10I:	3 ms, 1 Classes, 1 Objects, 79 bytes written
Warm:: T_10I:	3 ms, 1 Classes, 1 Objects, 79 bytes written
Cold:: TP_10I:	5 ms, 1 Classes, 1 Objects, 82 bytes written
Warm:: TP_10I:	2 ms, 1 Classes, 1 Objects, 82 bytes written
Cold:: TR_10I:	3 ms, 1 Classes, 1 Objects, 80 bytes written
Warm:: TR_10I:	2 ms, 1 Classes, 1 Objects, 80 bytes written
Cold:: T_LL:	12 ms, 1 Classes, 11 Objects, 140 bytes written
Warm:: T_LL:	8 ms, 1 Classes, 11 Objects, 140 bytes written
Cold:: T_BT:	136 ms, 1 Classes, 127 Objects, 1554 bytes written
Warm:: T_BT:	131 ms, 1 Classes, 127 Objects, 1554 bytes written
Cold:: TP_BT:	119 ms, 1 Classes, 127 Objects, 1809 bytes written
Warm:: TP_BT:	116 ms, 1 Classes, 127 Objects, 1809 bytes written

Running IPref on T_V T_V T_10I TP_10I TR_10I T_LL T_BT TP_BT
Cold:: T_V:	12 ms, 1 Classes, 1 Objects
Warm:: T_V:	1 ms, 1 Classes, 1 Objects
Cold:: T_V:	1 ms, 1 Classes, 1 Objects
Warm:: T_V:	1 ms, 1 Classes, 1 Objects
Cold:: T_10I:	11 ms, 1 Classes, 1 Objects
Warm:: T_10I:	3 ms, 1 Classes, 1 Objects
Cold:: TP_10I:	20 ms, 1 Classes, 1 Objects
Warm:: TP_10I:	2 ms, 1 Classes, 1 Objects
Cold:: TR_10I:	11 ms, 1 Classes, 1 Objects
Warm:: TR_10I:	2 ms, 1 Classes, 1 Objects
Cold:: T_LL:	19 ms, 1 Classes, 11 Objects
Warm:: T_LL:	8 ms, 1 Classes, 11 Objects
Cold:: T_BT:	128 ms, 1 Classes, 127 Objects
Warm:: T_BT:	118 ms, 1 Classes, 127 Objects
Cold:: TP_BT:	88 ms, 1 Classes, 127 Objects
Warm:: TP_BT:	72 ms, 1 Classes, 127 Objects

The script can be run with the -v switch, which prepends the test
class name to each line of performance information, or which the -vv
switch, which includes still more information. Leaving off these
switches entirely produces a column of uninterpreted performance
numbers. These options are intended to make it easier to cut and paste
performance comparisons between different versions of Object
Serialization code into a spreadsheet table.
