examples
Class FormatterBenchmark

java.lang.Object
  extended by com.google.caliper.api.Benchmark
      extended by com.google.caliper.SimpleBenchmark
          extended by examples.FormatterBenchmark
All Implemented Interfaces:
com.google.caliper.Benchmark

public class FormatterBenchmark
extends com.google.caliper.SimpleBenchmark

Compares Formatter against hand-written StringBuilder code.


Constructor Summary
FormatterBenchmark()
           
 
Method Summary
static void main(String[] args)
           
 void timeFormatter_NoFormatting(int reps)
           
 void timeFormatter_OneInt(int reps)
           
 void timeFormatter_OneString(int reps)
           
 void timeStringBuilder_NoFormatting(int reps)
           
 void timeStringBuilder_OneInt(int reps)
           
 void timeStringBuilder_OneString(int reps)
           
 
Methods inherited from class com.google.caliper.SimpleBenchmark
bytesToUnits, createBenchmark, getInstanceUnitNames, getMemoryUnitNames, getTimeUnitNames, instancesToUnits, nanosToUnits, normalizeScenario, parameterNames, parameterValues, setUp, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatterBenchmark

public FormatterBenchmark()
Method Detail

timeFormatter_NoFormatting

public void timeFormatter_NoFormatting(int reps)

timeStringBuilder_NoFormatting

public void timeStringBuilder_NoFormatting(int reps)

timeFormatter_OneInt

public void timeFormatter_OneInt(int reps)

timeStringBuilder_OneInt

public void timeStringBuilder_OneInt(int reps)

timeFormatter_OneString

public void timeFormatter_OneString(int reps)

timeStringBuilder_OneString

public void timeStringBuilder_OneString(int reps)

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2009-2011 Google, Inc.. All Rights Reserved.