@specs-feup/lara
Version:
A js port of the popular framework for building source-to-source compilers
37 lines • 1.74 kB
TypeScript
import BenchmarkInstance from "./BenchmarkInstance.js";
/**
* Represents a set of BenchmarkInstances.
*
* @param name - The name of this benchmark set.
*
* @deprecated Use javascript's builtin Set instead to build a set of BenchmarkInstances (e.g. new Set<BenchmarkInstance>()).
*/
export default abstract class BenchmarkSet {
private _name;
private compilationEngineProvider;
constructor(name: string);
getName(): string;
setCompilationEngine(compilationEngineProviderFunction: Parameters<BenchmarkInstance["setCompilationEngine"]>[0]): void;
/**
* Generator function that automatically handles loading/closing BenchmarkInstances.
*/
[Symbol.iterator](): Generator<BenchmarkInstance, void, unknown>;
/**
* Instances of benchmarks, according to the current configuration.
*
* @returns An array of BenchmarkInstance.
*/
getInstances(): BenchmarkInstance[];
/**
* Test the current benchmark set.
*
* @param worker - Function with no parameters that will be called after loading the bencharmk code as AST.
* @param executeCode - If true, executes the code after worker is applied.
* @param outputProcessor - If execution is enabled, will be called after execution with the corresponding ProcessExecutor.
*
* @returns An array with the names of benchmarks that finished with problemas, or an empty array if everything was fine.
*/
test(worker?: Parameters<BenchmarkInstance["test"]>[0], executeCode?: Parameters<BenchmarkInstance["test"]>[1], outputProcessor?: Parameters<BenchmarkInstance["test"]>[2]): string[];
protected abstract _getInstancesPrivate(): BenchmarkInstance[];
}
//# sourceMappingURL=BenchmarkSet.d.ts.map