UNPKG

@monstermann/tinybench-pretty-printer

Version:
16 lines (15 loc) 555 B
//#region src/columns/samples.ts function samples(options = {}) { return { header: options?.header ?? "samples", headerAlignment: options?.headerAlignment ?? "center", headerStyle: options?.headerStyle ?? ["bold"], rowAlignment: options?.rowAlignment ?? "right", rowStyle: options?.rowStyle ?? ["magenta"], content({ formatCount, task, tasks }) { return formatCount(options.method ?? "shortest", task.result.throughput.samplesCount, tasks.map((task$1) => task$1.result.throughput.samplesCount)); } }; } //#endregion export { samples };