[jboss-cvs] JBossCache/tests/perf/org/jboss/cache/marshall ...

Manik Surtani msurtani at jboss.com
Mon Jan 15 13:10:56 EST 2007


  User: msurtani
  Date: 07/01/15 13:10:56

  Modified:    tests/perf/org/jboss/cache/marshall 
                        VersionAwareMarshallerPerfTest.java
  Log:
  Made marshallers pluggable (JBCACHE-870)
  
  Revision  Changes    Path
  1.2       +15 -16    JBossCache/tests/perf/org/jboss/cache/marshall/VersionAwareMarshallerPerfTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: VersionAwareMarshallerPerfTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/marshall/VersionAwareMarshallerPerfTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- VersionAwareMarshallerPerfTest.java	12 Jan 2007 17:09:34 -0000	1.1
  +++ VersionAwareMarshallerPerfTest.java	15 Jan 2007 18:10:56 -0000	1.2
  @@ -7,16 +7,15 @@
   package org.jboss.cache.marshall;
   
   import junit.framework.TestCase;
  -import junit.awtui.TestRunner;
   import org.jboss.cache.RegionManager;
   import org.jboss.cache.misc.TestingUtil;
   
  -import java.io.ByteArrayOutputStream;
  -import java.io.ObjectOutputStream;
   import java.io.ByteArrayInputStream;
  +import java.io.ByteArrayOutputStream;
   import java.io.ObjectInputStream;
  -import java.util.Map;
  +import java.io.ObjectOutputStream;
   import java.util.HashMap;
  +import java.util.Map;
   import java.util.Random;
   
   /**
  @@ -58,7 +57,7 @@
         System.setProperty("serialization.jboss", "false");
         ObjectSerializationFactory.factory = new JavaObjectStreamFactory();
         ObjectSerializationFactory.useJBossSerialization = false;
  -      run('V', "Version Aware Marshaller - with Java Serialization");
  +      run('V', "Version Aware AbstractMarshaller - with Java Serialization");
      }
   
      public void testVamJBossSerialization() throws Exception
  @@ -66,7 +65,7 @@
         System.setProperty("serialization.jboss", "true");
         ObjectSerializationFactory.factory = (ObjectStreamFactory) Class.forName("org.jboss.cache.marshall.JBossObjectStreamFactory").newInstance();
         ObjectSerializationFactory.useJBossSerialization = true;
  -      run('V', "Version Aware Marshaller - with JBoss Serialization");
  +      run('V', "Version Aware AbstractMarshaller - with JBoss Serialization");
      }
   
      public void run(final char type, String name)
  @@ -92,35 +91,35 @@
   
                        node.put("key" + j, "value" + j);
                        
  -                     switch(type)
  +                     switch (type)
                        {
  -                        case 'S' :
  +                        case'S':
                              start = System.currentTimeMillis();
                              buffer = writeStandardSerialization(node);
                              timeTaken = System.currentTimeMillis() - start;
   
  -                           write[j+id] = timeTaken;
  +                           write[j + id] = timeTaken;
   
                              start = System.currentTimeMillis();
                              readStandardSerialization(buffer);
                              timeTaken = System.currentTimeMillis() - start;
   
  -                           read[j+id] = timeTaken;
  +                           read[j + id] = timeTaken;
                              break;
  -                        case 'V' :
  +                        case'V':
                              VersionAwareMarshaller marshaller = new VersionAwareMarshaller(new RegionManager(), false, false, "2.0.0.GA");
   
                              start = System.currentTimeMillis();
                              buffer = writeVam(marshaller, node);
                              timeTaken = System.currentTimeMillis() - start;
   
  -                           write[j+id] = timeTaken;
  +                           write[j + id] = timeTaken;
   
                              start = System.currentTimeMillis();
                              readVam(marshaller, buffer);
                              timeTaken = System.currentTimeMillis() - start;
   
  -                           read[j+id] = timeTaken;
  +                           read[j + id] = timeTaken;
                              break;
                        }
                     }
  
  
  



More information about the jboss-cvs-commits mailing list