cz.cuni.mff.d3s.spl.data.readers.DataReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spl-evaluation-java Show documentation
Show all versions of spl-evaluation-java Show documentation
Stochastice Performance Logic is a formalism for capturing performance
assumptions. It is, for example, possible to capture assumption that
newer version of a function bar is faster than the previous version or
that library foobar is faster than library barfoo when rendering
antialiased text.
The purpose of this framework is to allow evaluation of SPL formulas
inside Java applications.
package cz.cuni.mff.d3s.spl.data.readers;
import cz.cuni.mff.d3s.spl.data.DataInfo;
import cz.cuni.mff.d3s.spl.data.Revision;
import java.util.List;
import java.util.Map;
/**
* Provides unified interface to read measured data.
*
* Each implementation will specify it's argument semantics. Most
* of the readers use one of RevisionReaders to fetch single revision
* data.
*/
public interface DataReader {
/**
* Reads measured data.
*
* @param args Specific arguments for each reader.
* @return Map of benchmark/method/... info (only 'id' property is required,
* will be "default" if the data doesn't provide custom name) and list
* of data revisions.
* @throws ReaderException when there is an error while reading data
*/
Map> readData(String[] args) throws ReaderException;
/**
* Exception indicating error when reading data. Possible causes
* are IO error, wrong data format, invalid arguments, etc.
*/
class ReaderException extends Exception {
/**
* Standard constructor.
*/
public ReaderException() {}
/**
* Constructor which specify error message.
*
* @param message description of error
*/
public ReaderException(String message) {
super(message);
}
/**
* Specify error message and exception which caused this particular one.
*
* @param message description of error
* @param cause exception which cause this one to be thrown
*/
public ReaderException(String message, Throwable cause) {
super(message, cause);
}
/**
* Construct exception which was thrown as reaction to given one.
*
* @param cause exception which cause this one to be thrown
*/
public ReaderException(Throwable cause) {
super(cause);
}
}
}