net.sourceforge.basher.impl
Class XMLFileCollector

java.lang.Object
  extended by net.sourceforge.basher.impl.AbstractCollector
      extended by net.sourceforge.basher.impl.AbstractFileCollector
          extended by net.sourceforge.basher.impl.XMLFileCollector
All Implemented Interfaces:
EventListener, Collector, BasherEventListener, org.ops4j.gaderian.events.RegistryShutdownListener

public class XMLFileCollector
extends AbstractFileCollector

Version:
1.0
Author:
Johan Lindquist

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sourceforge.basher.impl.AbstractFileCollector
AbstractFileCollector.Classifier, AbstractFileCollector.FileEntry, AbstractFileCollector.Type
 
Field Summary
 
Fields inherited from class net.sourceforge.basher.impl.AbstractFileCollector
_collectionDirectory, _openFiles, _parent
 
Fields inherited from class net.sourceforge.basher.impl.AbstractCollector
_log, _timeSource
 
Constructor Summary
XMLFileCollector()
           
 
Method Summary
protected  String formatAverage(Average average)
          Writes the specified Average to the average file.
protected  String formatExecution(String taskName, long elapsedTime, long elapsedTimeNanos)
          Writes the time the specified task took to execute.
 void initializeService()
          Initializes the service.
 
Methods inherited from class net.sourceforge.basher.impl.AbstractFileCollector
closeOpenResources, dumpAverage, fail, getWriter, initializeCollector, markAverage, notRun, setAverageFilenamePrefix, setAverageFooter, setAverageHeader, setExecutionFooter, setExecutionHeader, setExtension, setNumThreads, setQueueCapacity, setTimeOut, success, writeToFile
 
Methods inherited from class net.sourceforge.basher.impl.AbstractCollector
basherEvent, getAverages, getFailures, getNotRun, getSuccesses, getTotal, isCollecting, registryDidShutdown, setLog, setTimeSource, startCollecting, stopCollecting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLFileCollector

public XMLFileCollector()
Method Detail

initializeService

public void initializeService()
                       throws Exception
Description copied from class: AbstractFileCollector
Initializes the service.

Overrides:
initializeService in class AbstractFileCollector
Throws:
Exception - If the script directory does not exist or can not be written to

formatAverage

protected String formatAverage(Average average)
Writes the specified Average to the average file.

Specified by:
formatAverage in class AbstractFileCollector
Parameters:
average - The average to write to disk

formatExecution

protected String formatExecution(String taskName,
                                 long elapsedTime,
                                 long elapsedTimeNanos)
Writes the time the specified task took to execute.

Specified by:
formatExecution in class AbstractFileCollector
Parameters:
taskName - The name of the task (used for the filename as well)
elapsedTime - Time the task took to execute
elapsedTimeNanos -


Copyright © 2006-2010 Basher Team. All Rights Reserved.