benchmark-meter
Version:
benchmark-meter is a straightforward benchmarking tool designed for measuring the performance of algorithms
53 lines (52 loc) • 1.43 kB
TypeScript
import { IResult } from './types';
import { IDataResult } from './types/IDataResult';
/**
* Represents a data result implementation.
*
*/
export declare class DataResult implements IDataResult {
private results;
private sortedResults;
/**
* Creates an instance of DataResult.
*
* @param {IResult[]} results - The array of results to initialize the instance.
*/
constructor(results: IResult[]);
/**
* Returns the original array of results.
*
* @returns {IResult[]} The original array of results.
* @since 1.0.0
*/
get(): IResult[];
/**
* Returns the fastest benchmark result.
*
* @returns {IResult} The fastest algorithm.
* @since 1.0.0
*/
fastest(): IResult;
/**
* Returns an array of benchmark results sorted from fastest to slowest.
*
* @returns {IResult[]} The array of algorithms sorted from fastest to slowest.
* @since 1.0.0
*/
fastestToSlowest(): IResult[];
/**
* Returns the slowest benchmark result.
*
* @returns {IResult} The slowest algorithm.
* @since 1.0.0
*/
slowest(): IResult;
/**
* Returns an array of benchmark results sorted from slowest to fastest.
*
* @returns {IResult[]} The array of algorithms sorted from slowest to fastest.
* @since 1.0.0
*/
slowestToFastest(): IResult[];
private sortResults;
}