org.objectweb.proactive.benchmarks.timit.util
Class Timed

java.lang.Object
  extended by org.objectweb.proactive.benchmarks.timit.util.Timed
All Implemented Interfaces:
java.io.Serializable

public class Timed
extends java.lang.Object
implements java.io.Serializable

All timed objects (like workers) must extends this class. It provide some useful methods to reduce timers between workers and generate statistics.

Author:
Brian Amedro, Vladimir Bodnartchouk
See Also:
Serialized Form

Constructor Summary
Timed()
          Singleton pattern
 
Method Summary
 void activate()
          Do not activate any counter
 void activate(EventObserver[] events)
           
 void activate(TimerCounter[] counters)
           
 void activate(TimerCounter[] counters, EventObserver[] events)
          Activate only some TimerCounters and EventObservers
 void activateDebug(EventObserver[] events)
           
 void activateDebug(TimerCounter[] counters)
           
 void activateDebug(TimerCounter[] counters, EventObserver[] events)
          Active only some counters.
 void finalizeTimed(int rank, java.lang.String information)
          This method performs the EventData and the Timer reduction.
 EventObservable getEventObservable()
           
 void resetTimer()
          Reset all the value of the timer
 void setTimerReduction(TimItReductor red)
          Invoked by TimItReductor to inform Timed object that he is the finalization reductor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Timed

public Timed()
Singleton pattern

Method Detail

activate

public void activate()
Do not activate any counter


activate

public void activate(TimerCounter[] counters)

activate

public void activate(EventObserver[] events)

activate

public void activate(TimerCounter[] counters,
                     EventObserver[] events)
Activate only some TimerCounters and EventObservers

Parameters:
counters - counters to activate
events - event to activate

activateDebug

public void activateDebug(TimerCounter[] counters)

activateDebug

public void activateDebug(EventObserver[] events)

activateDebug

public void activateDebug(TimerCounter[] counters,
                          EventObserver[] events)
Active only some counters. Debug version used to detect misplaced start/stop/reset. For real test, use activateCounters()

Parameters:
counters - the array of counters you want to use
events - the array of events you want to use

getEventObservable

public EventObservable getEventObservable()

resetTimer

public void resetTimer()
Reset all the value of the timer


setTimerReduction

public void setTimerReduction(TimItReductor red)
Invoked by TimItReductor to inform Timed object that he is the finalization reductor


finalizeTimed

public void finalizeTimed(int rank,
                          java.lang.String information)
This method performs the EventData and the Timer reduction.

Parameters:
rank - an identification number for this timed object
information - this message will be transmitted into results files


Copyright 2001-2007 INRIA All Rights Reserved.