|
From: <cle...@jb...> - 2006-06-05 21:01:34
|
You are measuring ClassLoading time of JBossSerialization also.
You should do something like:
| FileOutputStream fileOutputStream=new FileOutputStream(file);
| final ObjectOutputStream out = new JBossObjectOutputStream(fileOutputStream);
| final MyObject event = new MyObject(new Long(9999),new Date(),new Date(),"string1","string2",123,234,true,345);
|
| long firstTimeStamp=0;
|
| for(int i=0;i<20000;i++){
| if (i==1000)
| {
| firstTimeStamp=System.currentTimeMillis();
| }
| out.reset();
| out.writeObject(event);
| out.flush();
| }
|
|
| long timeSpent=System.currentTimeMillis()-firstTimeStamp;
| System.out.println(timeSpent);
|
What really cares in a sytem is a steady state. If you need to measure Loading Time there is no way to compete with Sun JDK's, as I can't modify the JVM to pre-load JBossSerialization.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949225#3949225
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949225
|