cppncss
Class AsciiResultOutput

java.lang.Object
  extended by cppncss.AbstractResultOutput
      extended by cppncss.AsciiResultOutput
All Implemented Interfaces:
ResultOutput

public final class AsciiResultOutput
extends AbstractResultOutput

Implements a text result output.

Author:
Mathieu Champlon

Constructor Summary
AsciiResultOutput(java.io.PrintStream stream)
          Create an ascii result output to a given stream.
 
Method Summary
 void flush()
          Notify about the end of the result flow.
 void notify(java.lang.String type, java.lang.String label, float average)
          Notify about an average.
 void notify(java.lang.String type, java.lang.String label, long sum)
          Notify about a sum.
protected  void printHeaders(java.lang.String type, java.util.List<java.lang.String> labels)
          Print measurements headers.
protected  void printIndex(java.lang.String item, int index)
          Print the index of an item.
protected  void printItem(java.lang.String item)
          Print an item.
protected  void printMeasurement(java.lang.String label, int count)
          Print a measurement.
 
Methods inherited from class cppncss.AbstractResultOutput
notify, notify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsciiResultOutput

public AsciiResultOutput(java.io.PrintStream stream)
Create an ascii result output to a given stream.

Parameters:
stream - the output print stream
Method Detail

printHeaders

protected void printHeaders(java.lang.String type,
                            java.util.List<java.lang.String> labels)
Print measurements headers.

Specified by:
printHeaders in class AbstractResultOutput
Parameters:
type - the type of the measurement
labels - a list of all measurement names

printIndex

protected void printIndex(java.lang.String item,
                          int index)
Print the index of an item.

Specified by:
printIndex in class AbstractResultOutput
Parameters:
item - the name of the item
index - the index

printMeasurement

protected void printMeasurement(java.lang.String label,
                                int count)
Print a measurement.

Specified by:
printMeasurement in class AbstractResultOutput
Parameters:
label - the name of the measurement
count - the result value of the measurement

printItem

protected void printItem(java.lang.String item)
Print an item.

Specified by:
printItem in class AbstractResultOutput
Parameters:
item - the name of the item

notify

public void notify(java.lang.String type,
                   java.lang.String label,
                   float average)
Notify about an average.

Parameters:
type - the type of measure
label - the measured item
average - the result

notify

public void notify(java.lang.String type,
                   java.lang.String label,
                   long sum)
Notify about a sum.

Parameters:
type - the type of measure
label - the measured item
sum - the result

flush

public void flush()
Notify about the end of the result flow.



Copyright © 2006-2007 null. All Rights Reserved.