com.google.caliper.runner
Class ArbitraryMeasurementInstrument

java.lang.Object
  extended by com.google.caliper.runner.Instrument
      extended by com.google.caliper.runner.ArbitraryMeasurementInstrument

public final class ArbitraryMeasurementInstrument
extends Instrument

Instrument for taking an arbitrary measurement. When using this instrument, the benchmark code itself returns the value. See ArbitraryMeasurement.

Author:
schmoe@google.com (mike nonemacher)

Constructor Summary
ArbitraryMeasurementInstrument()
           
 
Method Summary
 BenchmarkMethod createBenchmarkMethod(BenchmarkClass benchmarkClass, Method method)
           
 void dryRun(Benchmark benchmark, BenchmarkMethod benchmarkMethod)
           
 boolean isBenchmarkMethod(Method method)
           
 Class<? extends Worker> workerClass()
           
 Map<String,String> workerOptions()
           
 
Methods inherited from class com.google.caliper.runner.Instrument
createBenchmarkMethodFromTimeMethod, estimateRuntimePerTrial, isTimeMethod
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArbitraryMeasurementInstrument

public ArbitraryMeasurementInstrument()
Method Detail

isBenchmarkMethod

public boolean isBenchmarkMethod(Method method)
Specified by:
isBenchmarkMethod in class Instrument

createBenchmarkMethod

public BenchmarkMethod createBenchmarkMethod(BenchmarkClass benchmarkClass,
                                             Method method)
                                      throws InvalidBenchmarkException
Specified by:
createBenchmarkMethod in class Instrument
Throws:
InvalidBenchmarkException

dryRun

public void dryRun(Benchmark benchmark,
                   BenchmarkMethod benchmarkMethod)
            throws UserCodeException
Specified by:
dryRun in class Instrument
Throws:
UserCodeException

workerOptions

public Map<String,String> workerOptions()
Overrides:
workerOptions in class Instrument

workerClass

public Class<? extends Worker> workerClass()
Specified by:
workerClass in class Instrument


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