org.benchy.repository
Class FileBasedBenchmarkResultRepository

java.lang.Object
  extended by org.benchy.repository.FileBasedBenchmarkResultRepository
All Implemented Interfaces:
BenchmarkResultRepository

public class FileBasedBenchmarkResultRepository
extends Object
implements BenchmarkResultRepository

A BenchmarkResultRepository that persist on file system.

Implementation is not threadsafe.

Author:
Peter Veentjer.

Constructor Summary
FileBasedBenchmarkResultRepository()
          Creates a FileBasedBenchmarkResultRepository that stores all benchmark results in the temp directory.
FileBasedBenchmarkResultRepository(File rootDir)
           
FileBasedBenchmarkResultRepository(String rootDir)
           
 
Method Summary
 BenchmarkResult load(Date date, String benchmarkName)
          Loads all the testresults for a specific benchmark executed on a specific date.
 BenchmarkResult loadLast(Date date, String benchmarkName)
           
 BenchmarkResult loadLast(String benchmark)
           
 void store(BenchmarkResult benchmarkResult)
          Stores the BenchmarkResult in the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileBasedBenchmarkResultRepository

public FileBasedBenchmarkResultRepository()
Creates a FileBasedBenchmarkResultRepository that stores all benchmark results in the temp directory.


FileBasedBenchmarkResultRepository

public FileBasedBenchmarkResultRepository(String rootDir)

FileBasedBenchmarkResultRepository

public FileBasedBenchmarkResultRepository(File rootDir)
Method Detail

loadLast

public BenchmarkResult loadLast(Date date,
                                String benchmarkName)
Specified by:
loadLast in interface BenchmarkResultRepository

loadLast

public BenchmarkResult loadLast(String benchmark)
Specified by:
loadLast in interface BenchmarkResultRepository

load

public BenchmarkResult load(Date date,
                            String benchmarkName)
Description copied from interface: BenchmarkResultRepository
Loads all the testresults for a specific benchmark executed on a specific date.

Specified by:
load in interface BenchmarkResultRepository
Parameters:
date - the data the benchmark was executed
benchmarkName - the name of the benchmark.
Returns:
a list containing all TestResults for that specific benchmark on that specific date. If no items are found, an empty list is returned.

store

public void store(BenchmarkResult benchmarkResult)
Description copied from interface: BenchmarkResultRepository
Stores the BenchmarkResult in the repository.

Specified by:
store in interface BenchmarkResultRepository
Parameters:
benchmarkResult - the TestResult to store.


Copyright © 2008-2010 Multiverse. All Rights Reserved.