com.carrotsearch.junitbenchmarks
Class XMLConsumer

java.lang.Object
  extended by com.carrotsearch.junitbenchmarks.AutocloseConsumer
      extended by com.carrotsearch.junitbenchmarks.XMLConsumer
All Implemented Interfaces:
IResultsConsumer, Closeable

public final class XMLConsumer
extends AutocloseConsumer
implements Closeable

IResultsConsumer that writes XML files for each benchmark.


Field Summary
static String TIMESTAMP_FORMAT
          Timestamp format.
 
Constructor Summary
XMLConsumer()
          Instantiate from global options.
XMLConsumer(File fileName)
           
 
Method Summary
 void accept(Result result)
          Accept a single benchmark result.
 void close()
          Close the output XML stream.
 
Methods inherited from class com.carrotsearch.junitbenchmarks.AutocloseConsumer
addAutoclose, removeAutoclose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMESTAMP_FORMAT

public static final String TIMESTAMP_FORMAT
Timestamp format.

See Also:
Constant Field Values
Constructor Detail

XMLConsumer

public XMLConsumer()
            throws IOException
Instantiate from global options.

Throws:
IOException

XMLConsumer

public XMLConsumer(File fileName)
            throws IOException
Throws:
IOException
Method Detail

accept

public void accept(Result result)
            throws IOException
Accept a single benchmark result.

Specified by:
accept in interface IResultsConsumer
Throws:
IOException

close

public void close()
Close the output XML stream.

Specified by:
close in interface Closeable


Copyright © 2011 Carrot Search s.c.. All Rights Reserved.