Package com.thoughtworks.xstream.tools.benchmark

Examples of com.thoughtworks.xstream.tools.benchmark.Harness.addMetric()


        Options options = new Options();
        options.addOption("p", "product", true, "Class name of the product to use for benchmark");
        options.addOption("n", true, "Number of repetitions");

        Harness harness = new Harness();
        harness.addMetric(new DeserializationSpeedMetric(0, false) {
            public String toString() {
                return "Initial run deserialization";
            }
        });
View Full Code Here


        // harness.addMetric(new DeserializationSpeedMetric(1, false) {
        // public String toString() {
        // return "Initial run deserialization";
        // }
        // });
        harness.addMetric(new SerializationSpeedMetric(counter));
        harness.addMetric(new DeserializationSpeedMetric(counter, false));
        if (product == null) {
            harness.addProduct(new NoCache());
            harness.addProduct(new Cache122());
            harness.addProduct(new RealClassCache());
View Full Code Here

        // public String toString() {
        // return "Initial run deserialization";
        // }
        // });
        harness.addMetric(new SerializationSpeedMetric(counter));
        harness.addMetric(new DeserializationSpeedMetric(counter, false));
        if (product == null) {
            harness.addProduct(new NoCache());
            harness.addProduct(new Cache122());
            harness.addProduct(new RealClassCache());
            harness.addProduct(new SerializedClassCache());
View Full Code Here

            }
        } catch (ParseException e) {
            e.printStackTrace();
        }
       
        harness.addMetric(new DeserializationSpeedMetric(counter, false));
        harness.addTarget(new BasicTarget());
        harness.addTarget(new ExtendedTarget());
        harness.addTarget(new ReflectionTarget());
        harness.addTarget(new SerializableTarget());
        harness.addTarget(new JavaBeanTarget());
View Full Code Here

* @author Jörg Schaible
*/
public class StringsBenchmark {
    public static void main(String[] args) {
        Harness harness = new Harness();
        harness.addMetric(new DeserializationSpeedMetric(10, true));
        harness.addProduct(new StringNonCachingConverter());
        harness.addProduct(new StringInternConverter());
        harness.addProduct(new StringWithWeakHashMapConverter());
        harness.addProduct(new StringWithSynchronizedWeakHashMapConverter());
        harness.addTarget(new BigString());
View Full Code Here

        } catch (IOException e) {
            throw new RuntimeException(e);
        }

        Harness stats = new Harness();
        stats.addMetric(new SizeMetric());
        stats.addMetric(new CharacterCountMetric('$'));
        stats.addMetric(new CharacterCountMetric('_'));
        stats.addProduct(new NoReplacer());
        stats.addTarget(new FieldReflection());
        stats.addTarget(new Field_Reflection());
View Full Code Here

            throw new RuntimeException(e);
        }

        Harness stats = new Harness();
        stats.addMetric(new SizeMetric());
        stats.addMetric(new CharacterCountMetric('$'));
        stats.addMetric(new CharacterCountMetric('_'));
        stats.addProduct(new NoReplacer());
        stats.addTarget(new FieldReflection());
        stats.addTarget(new Field_Reflection());
        stats.addTarget(new Field$Reflection());
View Full Code Here

        }

        Harness stats = new Harness();
        stats.addMetric(new SizeMetric());
        stats.addMetric(new CharacterCountMetric('$'));
        stats.addMetric(new CharacterCountMetric('_'));
        stats.addProduct(new NoReplacer());
        stats.addTarget(new FieldReflection());
        stats.addTarget(new Field_Reflection());
        stats.addTarget(new Field$Reflection());
        stats.run(new MultiReporter(reporters) {
View Full Code Here

            }

        });

        Harness harness = new Harness();
        harness.addMetric(new SerializationSpeedMetric(100));
        harness.addMetric(new DeserializationSpeedMetric(100, false));
        harness.addProduct(new CombinedLookupReplacer(0));
        // harness.addProduct(new CombinedLookupReplacer(32));
        harness.addProduct(new CombinedLookupAppender(0));
        // harness.addProduct(new CombinedLookupAppender(32));
View Full Code Here

        });

        Harness harness = new Harness();
        harness.addMetric(new SerializationSpeedMetric(100));
        harness.addMetric(new DeserializationSpeedMetric(100, false));
        harness.addProduct(new CombinedLookupReplacer(0));
        // harness.addProduct(new CombinedLookupReplacer(32));
        harness.addProduct(new CombinedLookupAppender(0));
        // harness.addProduct(new CombinedLookupAppender(32));
        harness.addProduct(new SeparateLookupReplacer(0));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.