import java.io.*; import java.util.Random; public class SerializationThroughput { static Random rand = new Random(); static public void main(String[] args) throws Exception { System.out.println("record size\trecords written\tbytes per record\trecords per sec\tintegers per sec"); for (int n=1; n<50000; n=(int)(1.2*n)+1) { File file = new File ("tmp.tmp"); FileOutputStream fos = new FileOutputStream(file); ObjectOutputStream oos = new ObjectOutputStream(fos); Thread.sleep(1000); //Wait for any disk activity to stop. Integer d[] = new Integer[n]; for (int k=0; k