gr.uoa.di.madgik.searchlibrary.operatorlibrary.stats
Class StatsContainer

java.lang.Object
  extended by java.lang.Thread
      extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.stats.StatsContainer
All Implemented Interfaces:
Runnable

public class StatsContainer
extends Thread

Generic class containing statistic information

Author:
UoA

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
StatsContainer()
          Constructor
 
Method Summary
 void fatalError()
          fatal error
 void fromXML(String xml)
           
 void newInvocation()
          new invocation
 void producedResults(long results)
          results produced
 void productionRate(float time)
          mean production rate
 void run()
           
 void timeToComplete(long time)
          mean time for complete
 void timeToFirst(long time)
          mean time for first result
 void timeToFirstInput(long time)
          mean time for first input
 void timeToInitialize(long time)
          mean time for initialization
 void timeToReference(long time)
          mean time for reference
 String toXML()
          generates an xml serialization of the statistics
 void writeToRI()
          Writes the statistics to the RI profile
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatsContainer

public StatsContainer()
Constructor

Parameters:
RItoKeepStatsFor - the RI to keep statistics for
Method Detail

newInvocation

public void newInvocation()
new invocation


fatalError

public void fatalError()
fatal error


timeToReference

public void timeToReference(long time)
mean time for reference

Parameters:
time - time in millisecs

timeToComplete

public void timeToComplete(long time)
mean time for complete

Parameters:
time - time in millisecs

timeToInitialize

public void timeToInitialize(long time)
mean time for initialization

Parameters:
time - time in millisecs

producedResults

public void producedResults(long results)
results produced

Parameters:
results - number of results

timeToFirst

public void timeToFirst(long time)
mean time for first result

Parameters:
time - time in millisecs

productionRate

public void productionRate(float time)
mean production rate

Parameters:
time - time in millisecs

timeToFirstInput

public void timeToFirstInput(long time)
mean time for first input

Parameters:
time - time in millisecs

writeToRI

public void writeToRI()
Writes the statistics to the RI profile


run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Runnable.run()

toXML

public String toXML()
generates an xml serialization of the statistics

Returns:
the xml serialization

fromXML

public void fromXML(String xml)
             throws Exception
Throws:
Exception


Copyright © 2013. All Rights Reserved.