@eagleoutice/flowr-dev
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
28 lines (27 loc) • 1.54 kB
TypeScript
/**
* A small, fixed, and purely synthetic workload used to calibrate the benchmark results.
*
* Publishing its runtime alongside the real measurements allows a viewer to normalize the other numbers by it,
* and hence to cancel out how fast or how loaded the machine was that produced them.
* The workload must therefore stay deterministic (no file system, no R session, no randomness).
*
* Changing the work, the round count, or the way the repetitions are reduced puts every future run on a
* new scale, incomparable to the published history. Whoever changes it has to say so in the name of the
* measurement (`calibration v2`, ...).
* @module
*/
/** How often the {@link calibrationBatch} is timed within one {@link runCalibration} call. */
export declare const CalibrationReps = 4;
/** How many files of a suite carry the calibration, which describes the machine and not the file. */
export declare const CalibrationSamples = 8;
/** How many {@link calibrationRound}s make up one timed batch. */
export declare const CalibrationRounds = 256;
/** How many elements a single {@link calibrationRound} works on. */
export declare const CalibrationSize = 4096;
/**
* Times {@link calibrationBatch} {@link CalibrationReps} times and reports the fastest of them.
* @returns the nanoseconds the fastest batch took
*/
export declare function runCalibration(): bigint;
/** the checksum of the rounds run so far, only exposed so that the workload has an observable effect */
export declare function calibrationChecksum(): number;