org.jboss.jrunit.controller
Class BenchmarkController

java.lang.Object
  extended by org.jboss.jrunit.controller.BenchmarkController
All Implemented Interfaces:
IBenchmark

public class BenchmarkController
extends java.lang.Object
implements IBenchmark

Use one instance of this controller for each Thread

Author:
Clebert Suconic

Constructor Summary
BenchmarkController()
           
 
Method Summary
 void addBench(Benchmark benchmark)
          A way to aggregate Benchmarks
 void addMeasure(java.lang.String measureName, java.lang.Number value)
          This will add a measure o the current Benchmark
 void clear()
           
 void closeBench(java.lang.String benchmarkName)
          This will basically send a sign to the Controller implementation that a new benchmark is being started.
static Benchmark findBenchmark(java.util.Map benchmarks, Benchmark key)
           
static Benchmark findBenchmark(java.util.Map benchmarks, java.lang.String name, java.util.Map metaData)
           
 Benchmark findBenchmark(java.lang.String name)
           
 Benchmark findBenchmark(java.lang.String name, java.util.Map metaData)
           
 java.util.Collection getBenchmarks()
           
 void openBench(java.lang.String benchmarkName)
          /** This will basically send a sign to the Controller implementation that a new benchmark is being stoped.
 void openBench(java.lang.String benchmarkName, java.util.Map metadata)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BenchmarkController

public BenchmarkController()
Method Detail

clear

public void clear()

addMeasure

public void addMeasure(java.lang.String measureName,
                       java.lang.Number value)
Description copied from interface: IBenchmark
This will add a measure o the current Benchmark

Specified by:
addMeasure in interface IBenchmark

getBenchmarks

public java.util.Collection getBenchmarks()

addBench

public void addBench(Benchmark benchmark)
A way to aggregate Benchmarks


openBench

public void openBench(java.lang.String benchmarkName)
Description copied from interface: IBenchmark
/** This will basically send a sign to the Controller implementation that a new benchmark is being stoped. Usually the implementation will capture information like current CPU state, memory state or any sort of resources associated with this Implementation.

Specified by:
openBench in interface IBenchmark

findBenchmark

public Benchmark findBenchmark(java.lang.String name)

findBenchmark

public Benchmark findBenchmark(java.lang.String name,
                               java.util.Map metaData)

findBenchmark

public static Benchmark findBenchmark(java.util.Map benchmarks,
                                      java.lang.String name,
                                      java.util.Map metaData)

findBenchmark

public static Benchmark findBenchmark(java.util.Map benchmarks,
                                      Benchmark key)

closeBench

public void closeBench(java.lang.String benchmarkName)
Description copied from interface: IBenchmark
This will basically send a sign to the Controller implementation that a new benchmark is being started. Usually the implementation will capture information like current CPU state, memory state or any sort of resources associated with this Implementation.

Specified by:
closeBench in interface IBenchmark

openBench

public void openBench(java.lang.String benchmarkName,
                      java.util.Map metadata)


JRunit, a JUnit extension for distributed client/server tests.