org.jboss.jrunit.controller
Class ThreadLocalBenchmark

java.lang.Object
  extended by org.jboss.jrunit.controller.ThreadLocalBenchmark

public class ThreadLocalBenchmark
extends java.lang.Object

Encapsulates JGroupsBenchmarkSender

Author:
Clebert Suconic

Field Summary
static java.lang.ThreadLocal local
           
 
Constructor Summary
ThreadLocalBenchmark()
           
 
Method Summary
static void addMeasure(java.lang.String measureName, java.lang.Number value)
          This will add a measure o the current Benchmark
static void clear()
           
static void close()
          Serialize the capture values sending to the controller
static void closeBench(java.lang.String benchmarkName)
          This will basically send a sign to the Controller implementation that a new benchmark is being started.
static void openBench(java.lang.String benchmarkName)
          /** This will basically send a sign to the Controller implementation that a new benchmark is being stoped.
static void openBench(java.lang.String benchmarkName, java.util.Map metadata)
           
static void sendAntQuit()
           
static void sendData()
          Serialize the capture values sending to the controller
static void sendQuit()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

local

public static java.lang.ThreadLocal local
Constructor Detail

ThreadLocalBenchmark

public ThreadLocalBenchmark()
Method Detail

closeBench

public static void closeBench(java.lang.String benchmarkName)
                       throws java.lang.Exception
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.

Parameters:
benchmarkName - - The name of the benchmark which is being measured.
Throws:
java.lang.Exception

openBench

public static void openBench(java.lang.String benchmarkName)
                      throws java.lang.Exception
/** 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.

Parameters:
benchmarkName - - The name of the benchmark which is being measured.
Throws:
java.lang.Exception

addMeasure

public static void addMeasure(java.lang.String measureName,
                              java.lang.Number value)
                       throws java.lang.Exception
This will add a measure o the current Benchmark

Throws:
java.lang.Exception

sendData

public static void sendData()
                     throws java.lang.Exception
Serialize the capture values sending to the controller

Throws:
java.lang.Exception

clear

public static void clear()
                  throws java.lang.Exception
Throws:
java.lang.Exception

close

public static void close()
                  throws java.lang.Exception
Serialize the capture values sending to the controller

Throws:
java.lang.Exception

sendQuit

public static void sendQuit()
                     throws java.lang.Exception
Throws:
java.lang.Exception

sendAntQuit

public static void sendAntQuit()
                        throws java.lang.Exception
Throws:
java.lang.Exception

openBench

public static void openBench(java.lang.String benchmarkName,
                             java.util.Map metadata)
                      throws java.lang.Exception
Throws:
java.lang.Exception


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