TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.tptp.trace.ui.internal.launcher.deleg.application
Class StatGeneratorDataProcessor

java.lang.Object
  extended by org.eclipse.hyades.loaders.util.XMLLoader
      extended by org.eclipse.hyades.loaders.util.BinaryLoader
          extended by org.eclipse.hyades.trace.ui.internal.piclient.XMLTraceDataProcessor
              extended by org.eclipse.tptp.trace.ui.internal.launcher.deleg.application.StatGeneratorDataProcessor
All Implemented Interfaces:
org.eclipse.hyades.execution.core.IDataProcessor, DataProcessor, DataServerListener, ExtendedDataServerListener, org.eclipse.hyades.loaders.util.IXMLLoader, IExtendedLoader
Direct Known Subclasses:
TIDelegateHelper.ACDataProcessorAdapter, TIInstrumentDelegateHelper.ACDataProcessorAdapter

public class StatGeneratorDataProcessor
extends XMLTraceDataProcessor

Extends the XML trace data processor so that it can report statistical measurements (e.g. the size of the last incomming event). The overhead should be next to nothing.


Field Summary
 
Fields inherited from class org.eclipse.hyades.trace.ui.internal.piclient.XMLTraceDataProcessor
BUFFER_SIZE, END_TAG, END_TAG_REPLACE, END_TRACE, fileWriter, firstEvent, ID1_IN, ID1_OUT, ID2_IN, ID2_OUT, INCOMMING_DATA, NEW_LINE, newFile, prevTotalBytesRead, profileFileName, specialProcessing, START_TAG, START_TRACE, startTime, tempRemaining, totalBytesRead, validTag, XML_VERSION, XML_VERSION_TAG
 
Fields inherited from class org.eclipse.hyades.loaders.util.XMLLoader
context, currentAttributeName, currentElementName, currentLoader, debug, defaultLoader, depth, error, file, fragmentsCount, LE_IN, LE_OUT, loaders, p, rootElement, sb, scanner, startDocument
 
Constructor Summary
StatGeneratorDataProcessor(org.eclipse.hyades.models.hierarchy.TRCAgentProxy agentProxy)
          Constructor
 
Method Summary
 int getSizeOfLastEvent()
          Returns the size of the last incoming event.
 void incommingData(byte[] buffer, int offset, int length, java.net.InetAddress peer)
          Invoked when there is incoming events.
 void incommingData(char[] buffer, int offset, int length, java.net.InetAddress peer)
          Invoked when there is incoming data
 void resetStats()
          Resets the statistical measurements that it keeps track.
 
Methods inherited from class org.eclipse.hyades.trace.ui.internal.piclient.XMLTraceDataProcessor
checkAndRemoveEndTag, cleanUp, copyFile, copyZip, createWriter, dataServerExited, dispose, endTrace, getAgentProxy, getDumpFileName, getProfileFileName, getTimeStamp, getWriter, handleOutOfMemoryError, incommingData, incommingData, incommingStream, invalidDataType, invalidDataType, isNewProfileFile, isValidTag, loadEvent, loadEvent, loadEventHook, loadEventHook, loadEvents, makeWriter, notifyListener, renameFile, setProfileFileName, setWriter, startsWith, startTrace, stopAgent, waitingForData, writeByte, writeHeader, writeXMLVersion
 
Methods inherited from class org.eclipse.hyades.loaders.util.BinaryLoader
isLoadXml, loadEvents, setLoadXml
 
Methods inherited from class org.eclipse.hyades.loaders.util.XMLLoader
addToResource, attributeName, attributeName, attributeValueCharacters, attributeValueCharacters, characters, checkForStopProcessing, createOutputFile, endDocument, endElement, endElement, error, error, getContext, getLoader, getName, getProcessedFragments, isIgnoredElement, loadEvent, loadEvent, loadEvent, loadEvent, log, log, makeParser, makeScanner, printLoadInfo, processGlobalForwardReferences, restartParser, setCollectionMode, setLoadToModel, startDocument, startElement, startElement, toString, writeToBinaryOutputFile, writeToTextOutputFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatGeneratorDataProcessor

public StatGeneratorDataProcessor(org.eclipse.hyades.models.hierarchy.TRCAgentProxy agentProxy)
Constructor

Parameters:
agentProxy - The agent proxy
Method Detail

incommingData

public void incommingData(byte[] buffer,
                          int offset,
                          int length,
                          java.net.InetAddress peer)
Invoked when there is incoming events.

Specified by:
incommingData in interface ExtendedDataServerListener
Overrides:
incommingData in class XMLTraceDataProcessor
Parameters:
buffer - The buffer to be processed
length - The length of the buffer
peer - The peer host

incommingData

public void incommingData(char[] buffer,
                          int offset,
                          int length,
                          java.net.InetAddress peer)
Invoked when there is incoming data

Specified by:
incommingData in interface ExtendedDataServerListener
Overrides:
incommingData in class XMLTraceDataProcessor
Parameters:
buffer - The buffer to be processed
length - The length of the buffer
peer - The peer host

getSizeOfLastEvent

public int getSizeOfLastEvent()
Returns the size of the last incoming event.

Returns:
The size of the last incoming event.

resetStats

public void resetStats()
Resets the statistical measurements that it keeps track.


TPTP 4.5.0 Platform Project
Internal API Specification