All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cz.cuni.mff.d3s.spl.data.readers.DataReader Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 1.0.4
Show newest version
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);
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy