(files: File[])
| 861 | } |
| 862 | |
| 863 | reportBenchmarkSummary(files: File[]): void { |
| 864 | const benches = getTests(files) |
| 865 | const topBenches = benches.filter(i => i.result?.benchmark?.rank === 1) |
| 866 | |
| 867 | this.log(`\n${withLabel('cyan', 'BENCH', 'Summary\n')}`) |
| 868 | |
| 869 | for (const bench of topBenches) { |
| 870 | const group = bench.suite || bench.file |
| 871 | |
| 872 | if (!group) { |
| 873 | continue |
| 874 | } |
| 875 | |
| 876 | const groupName = this.getFullName(group, separator) |
| 877 | const project = this.ctx.projects.find(p => p.name === bench.file.projectName) |
| 878 | |
| 879 | this.log(` ${formatProjectName(project)}${bench.name}${c.dim(` - ${groupName}`)}`) |
| 880 | |
| 881 | const siblings = group.tasks |
| 882 | .filter(i => i.meta.benchmark && i.result?.benchmark && i !== bench) |
| 883 | .sort((a, b) => a.result!.benchmark!.rank - b.result!.benchmark!.rank) |
| 884 | |
| 885 | for (const sibling of siblings) { |
| 886 | const number = (sibling.result!.benchmark!.mean / bench.result!.benchmark!.mean).toFixed(2) |
| 887 | this.log(c.green(` ${number}x `) + c.gray('faster than ') + sibling.name) |
| 888 | } |
| 889 | |
| 890 | this.log('') |
| 891 | } |
| 892 | } |
| 893 | |
| 894 | private printTaskErrors(tasks: Task[], errorDivider: () => void) { |
| 895 | const errorsQueue: [error: TestError | undefined, tests: Task[]][] = [] |
nothing calls this directly
no test coverage detected