com.carrotsearch.junitbenchmarks
Class BenchmarkOptionsSystemProperties

java.lang.Object
  extended by com.carrotsearch.junitbenchmarks.BenchmarkOptionsSystemProperties

public final class BenchmarkOptionsSystemProperties
extends Object

Global settings for benchmarks set through system properties. If IGNORE_ANNOTATION_OPTIONS_PROPERTY is specified, the system properties and defaults will take precedence over the method- and class-level annotations.


Field Summary
static String BENCHMARK_ROUNDS_PROPERTY
          "jub.rounds.benchmark": the default number of benchmark rounds.
static String CHARTS_DIR_PROPERTY
          "jub.charts.dir": output directory for benchmark charts if H2Consumer is active and chart annotations are present.
static String CONCURRENCY_PROPERTY
          "jub.concurrency": the default number of threads.
static String CONSUMERS_PROPERTY
          "jub.consumers": specifies the consumers to instantiate and add to the benchmark results feed.
static String CUSTOMKEY_PROPERTY
          "jub.customkey": custom key to attach to the run.
static String DB_FILE_PROPERTY
          "jub.db.file": if set, an H2Consumer is added to the consumers list and benchmark results are saved to a database.
static String IGNORE_ANNOTATION_OPTIONS_PROPERTY
          "jub.ignore.annotations": if true, the defaults (or property values) take precedence over BenchmarkOptions annotations.
static String IGNORE_CALLGC_PROPERTY
          "jub.ignore.callgc": if true, do not call System.gc() between rounds.
static String WARMUP_ROUNDS_PROPERTY
          "jub.rounds.warmup": the default number of warmup rounds.
static String XML_FILE_PROPERTY
          "jub.xml.file": if set, an XMLConsumer is added to the consumers list.
 
Constructor Summary
BenchmarkOptionsSystemProperties()
           
 
Method Summary
static IResultsConsumer[] getDefaultConsumers()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WARMUP_ROUNDS_PROPERTY

public static final String WARMUP_ROUNDS_PROPERTY
"jub.rounds.warmup": the default number of warmup rounds.

See Also:
Constant Field Values

BENCHMARK_ROUNDS_PROPERTY

public static final String BENCHMARK_ROUNDS_PROPERTY
"jub.rounds.benchmark": the default number of benchmark rounds.

See Also:
Constant Field Values

CONCURRENCY_PROPERTY

public static final String CONCURRENCY_PROPERTY
"jub.concurrency": the default number of threads.

See Also:
Constant Field Values

IGNORE_ANNOTATION_OPTIONS_PROPERTY

public static final String IGNORE_ANNOTATION_OPTIONS_PROPERTY
"jub.ignore.annotations": if true, the defaults (or property values) take precedence over BenchmarkOptions annotations.

See Also:
Constant Field Values

IGNORE_CALLGC_PROPERTY

public static final String IGNORE_CALLGC_PROPERTY
"jub.ignore.callgc": if true, do not call System.gc() between rounds. Speeds up tests a lot, but renders GC statistics useless.

See Also:
Constant Field Values

XML_FILE_PROPERTY

public static final String XML_FILE_PROPERTY
"jub.xml.file": if set, an XMLConsumer is added to the consumers list.

See Also:
Constant Field Values

DB_FILE_PROPERTY

public static final String DB_FILE_PROPERTY
"jub.db.file": if set, an H2Consumer is added to the consumers list and benchmark results are saved to a database. This property must point to the H2 database file's location (without .h2.db suffix). If the database does not exist, it will be created.

See Also:
Constant Field Values

CHARTS_DIR_PROPERTY

public static final String CHARTS_DIR_PROPERTY
"jub.charts.dir": output directory for benchmark charts if H2Consumer is active and chart annotations are present. If not present, the current working directory is used.

See Also:
Constant Field Values

CUSTOMKEY_PROPERTY

public static final String CUSTOMKEY_PROPERTY
"jub.customkey": custom key to attach to the run.

See Also:
Constant Field Values

CONSUMERS_PROPERTY

public static final String CONSUMERS_PROPERTY
"jub.consumers": specifies the consumers to instantiate and add to the benchmark results feed. This property takes a comma-separated list of values from ConsumerName.

See Also:
Constant Field Values
Constructor Detail

BenchmarkOptionsSystemProperties

public BenchmarkOptionsSystemProperties()
Method Detail

getDefaultConsumers

public static IResultsConsumer[] getDefaultConsumers()
Returns:
Return the default IResultsConsumer.


Copyright © 2011 Carrot Search s.c.. All Rights Reserved.