cappi icon indicating copy to clipboard operation
cappi copied to clipboard

cappi does not work with more than one benchmark

Open amato-gianluca opened this issue 12 years ago • 0 comments

Hi, I am trying to use cappi in my project (jandom-devel/jandom). When there is more than one benchmark, the command cappi::benchmark does not work, since the com.google.caliper.Runner class does not allow more than one benchmark class.

This is the output I get:

> show cappi::benchmarks
[info] ArrayBuffer(it.unich.sci.jandom.JandomBenchmark, it.unich.sci.jandom.BoxDoubleBenchmark)
[success] Total time: 0 s, completed Sep 3, 2013 1:01:01 PM
> cappi::benchmark
[info] Compiling 1 Scala source to /home/amato/git/Jandom/core/target/scala-2.10/classes...
[info] Running com.google.caliper.Runner it.unich.sci.jandom.JandomBenchmark it.unich.sci.jandom.BoxDoubleBenchmark
[error] Error: Multiple benchmark classes specified: [it.unich.sci.jandom.JandomBenchmark, it.unich.sci.jandom.BoxDoubleBenchmark]
[info] 
[info] Usage: Runner [OPTIONS...] <benchmark>
[info] 
[info]   <benchmark>: a benchmark class or suite
[info] 
[info] OPTIONS
[info] 
[info]   -D<param>=<value>: fix a benchmark parameter to a given value.
[info]         Multiple values can be supplied by separating them with the
[info]         delimiter specified in the --delimiter argument.
[info] 
[info]         For example: "-Dfoo=bar,baz,bat"
[info] 
[info]         "benchmark" is a special parameter that can be used to specify
[info]         which benchmark methods to run. For example, if a benchmark has
[info]         the method "timeFoo", it can be run alone by using
[info]         "-Dbenchmark=Foo". "benchmark" also accepts a delimiter
[info]         separated list of methods to run.
[info] 
[info]   -J<param>=<value>: set a JVM argument to the given value.
[info]         Multiple values can be supplied by separating them with the
[info]         delimiter specified in the --delimiter argument.
[info] 
[info]         For example: "-JmemoryMax=-Xmx32M,-Xmx512M"
[info] 
[info]   --delimiter <delimiter>: character or string to use as a delimiter
[info]         for parameter and vm values.
[info]         Default: ","
[info] 
[info]   --warmupMillis <millis>: duration to warmup each benchmark
[info] 
[info]   --runMillis <millis>: duration to execute each benchmark
[info] 
[info]   --captureVmLog: record the VM's just-in-time compiler and GC logs.
[info]         This may slow down or break benchmark display tools.
[info] 
[info]   --measureMemory: measure the number of allocations done and the amount of
[info]         memory used by invocations of the benchmark.
[info]         Default: off
[info] 
[info]   --vm <vm>: executable to test benchmark on. Multiple VMs may be passed
[info]         in as a list separated by the delimiter specified in the
[info]         --delimiter argument.
[info] 
[info]   --timeUnit <unit>: unit of time to use for result. Depends on the units
[info]         defined in the benchmark's getTimeUnitNames() method, if defined.
[info]         Default Options: ns, us, ms, s
[info] 
[info]   --instanceUnit <unit>: unit to use for allocation instances result.
[info]         Depends on the units defined in the benchmark's
[info]         getInstanceUnitNames() method, if defined.
[info]         Default Options: instances, K instances, M instances, B instances
[info] 
[info]   --memoryUnit <unit>: unit to use for allocation memory size result.
[info]         Depends on the units defined in the benchmark's
[info]         getMemoryUnitNames() method, if defined.
[info]         Default Options: B, KB, MB, GB
[info] 
[info]   --saveResults <file/dir>: write results to this file or directory
[info] 
[info]   --printScore: if present, also display an aggregate score for this run,
[info]         where higher is better. This number has no particular meaning,
[info]         but can be compared to scores from other runs that use the exact
[info]         same arguments.
[info] 
[info]   --uploadResults <file/dir>: upload this file or directory of files
[info]         to the web app. This argument ends Caliper early and is thus
[info]         incompatible with all other arguments.
[info] 
[info]   --debug: run without measurement for use with debugger or profiling.
[info] 
[info]   --debug-reps: fixed number of reps to run with --debug.
[info]         Default: "1000"
[trace] Stack trace suppressed: run last JandomExtended/*:cappi for the full output.
[error] (JandomExtended/*:cappi::benchmark) Nonzero exit code returned from runner: 1
[error] Total time: 3 s, completed Sep 3, 2013 1:03:01 PM

amato-gianluca avatar Sep 03 '13 11:09 amato-gianluca