de.cesr.lara.toolbox.runtime
Class SimplePerformanceStatistics

java.lang.Object
  extended by de.cesr.lara.toolbox.runtime.SimplePerformanceStatistics
All Implemented Interfaces:
LaraAbstractEventSubscriber, LaraEventSubscriber, LaraInternalEventSubscriber

public class SimplePerformanceStatistics
extends Object
implements LaraEventSubscriber, LaraInternalEventSubscriber

simple performance data output. creates csv-file and appends one line for every


Constructor Summary
SimplePerformanceStatistics(LEventbus eventbus)
          creates the file with key as name and header
SimplePerformanceStatistics(LEventbus eventbus, Set<Class> eventsToTrack)
          creates the file with key as name and header
 
Method Summary
 void appendCurrentStats(LaraEvent event, String newMetaInfo)
          appends current stats to the output file
<T extends LaraEvent>
void
onEvent(T event)
          Will be called with an event as a parameter when an event the subscriber subscribed to occurs.
 void onInternalEvent(LaraEvent event)
          Only for internal super classes beeing part of the LARA core.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePerformanceStatistics

public SimplePerformanceStatistics(LEventbus eventbus)
creates the file with key as name and header

Parameters:
key -

SimplePerformanceStatistics

public SimplePerformanceStatistics(LEventbus eventbus,
                                   Set<Class> eventsToTrack)
creates the file with key as name and header

Parameters:
key -
Method Detail

appendCurrentStats

public void appendCurrentStats(LaraEvent event,
                               String newMetaInfo)
appends current stats to the output file

Parameters:
value -

onEvent

public <T extends LaraEvent> void onEvent(T event)
Description copied from interface: LaraEventSubscriber
Will be called with an event as a parameter when an event the subscriber subscribed to occurs. Implement this to react on events. Typically you would start doing something like if (event instanceof VeryInterestingEvent) { //do something smart }

Specified by:
onEvent in interface LaraEventSubscriber

onInternalEvent

public void onInternalEvent(LaraEvent event)
Description copied from interface: LaraInternalEventSubscriber
Only for internal super classes beeing part of the LARA core. Use this in your base class to react on events, when the reaction should not be overridden by subclasses.

Specified by:
onInternalEvent in interface LaraInternalEventSubscriber