Examples of addMetric()


Examples of com.google.gdata.data.analytics.DataEntry.addMetric()

      // Add all metrics.
      for (int metricIndex = 0; metricIndex < metrics.length; metricIndex++) {
        Metric metric = new Metric();
        metric.setValue(metrics[metricIndex][entryIndex]);
        metric.setConfidenceInterval(confidenceInterval);
        entry.addMetric(metric);
      }
      entryList.add(entry);
    }

    feed.setEntries(entryList);
View Full Code Here

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

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

        // 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

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

        // 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

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

            }
        } 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

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

* @author J&ouml;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

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

        } 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

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

            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

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

        }

        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

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

            }

        });

        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
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.