IgnoringGC

A measurer that discards measurements during which it detects GC cycles.

A measurer that discards measurements during which it detects GC cycles.

Assume that M measurements are requested. To prevent looping forever, after the number of measurement failed due to GC exceeds the number of successful measurements by more than M, the subsequent measurements are accepted regardless of whether GC cycles occur.

trait Timer
trait Measurer[Double]
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

def measure[T](context: Context, measurements: Int, setup: T => Any, tear: T => Any, regen: () => T, snippet: T => Any): Seq[Quantity[Double]]
override def name: String
Definition Classes

Inherited methods

def afterExecution(context: Context): Unit

Does some final cleanup after execution of all benchmarks in a performance test.

Does some final cleanup after execution of all benchmarks in a performance test.

This method is invoked in the PerformanceTest executeTests method just after execution of all benchmarks.

Most measurers do not need to do any side effects in beforeExecution, so the default implementation just does nothing.

Inherited from
Measurer
def beforeExecution(context: Context): Unit

Does some side effects before execution of all benchmarks in a performance test.

Does some side effects before execution of all benchmarks in a performance test.

This method is invoked in the PerformanceTest executeTests method just before execution of any benchmarks.

Most measurers do not need add additional context keys in prepareContext, so the default implementation just does nothing.

Inherited from
Measurer
def map[U](f: Quantity[Double] => Quantity[U]): Measurer[U]
Inherited from
Measurer

Modifies the initial test context.

Modifies the initial test context.

This method is invoked before the PerformanceTest object's ctor is invoked. The key-value pairs that the org.scalameter.Measurer adds to the org.scalameter.Context in this method are visible to all the test snippets within the PerformanceTest class.

Most measurers do not need to add any specific keys, so the default implementation just returns the context.

Inherited from
Measurer

Indicates if a measurer uses instrumented classpath - if true measurer must be run using an executor that spawns separate JVMs.

Indicates if a measurer uses instrumented classpath - if true measurer must be run using an executor that spawns separate JVMs.

Inherited from
Measurer
protected def valueAt[T](context: Context, iteration: Int, regen: () => T, v: T): T

Returns the value used for the benchmark at iteration. May optionally call regen to obtain a new value for the benchmark.

Returns the value used for the benchmark at iteration. May optionally call regen to obtain a new value for the benchmark.

By default, the value v is always returned and the value for the benchmark is never regenerated.

Inherited from
IterationBasedValue