Skip to content

Commit 6244f3f

Browse files
committed
refactor(utils): fix score report benchmark
Signed-off-by: Vojtech Masek <vojtech@flowup.cz>
1 parent 88adb21 commit 6244f3f

File tree

1 file changed

+13
-2
lines changed
  • packages/utils/perf/score-report

1 file changed

+13
-2
lines changed

packages/utils/perf/score-report/index.ts

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Benchmark from 'benchmark';
1+
import Benchmark from 'benchmark';
22
import type { Report } from '@code-pushup/models';
33
import { scoreReport } from '../../src/lib/reports/scoring';
44
import { scoreReportOptimized0 } from './optimized0';
@@ -34,6 +34,7 @@ const PROCESS_ARGUMENT_NUM_GROUPS_P2 = Number.parseInt(
3434
10,
3535
);
3636

37+
// eslint-disable-next-line import/no-named-as-default-member
3738
const suite = new Benchmark.Suite('report-scoring');
3839

3940
const AUDIT_PREFIX = 'a-';
@@ -131,8 +132,18 @@ function minimalReport(opt?: MinimalReportOptions): Report {
131132
const numAuditsP2 = opt?.numAuditsP2 ?? NUM_AUDITS_P2;
132133
const numGroupRefs2 = opt?.numGroupRefs2 ?? NUM_GROUPS_P2;
133134

135+
const date = new Date();
136+
134137
return {
135-
date: '2022-01-01',
138+
date: date.toISOString(),
139+
packageName: 'perf-benchmark',
140+
version: '0',
141+
commit: {
142+
date: date,
143+
message: 'perf: benchmark score report',
144+
author: 'me',
145+
hash: 'mock_hash',
146+
},
136147
duration: 0,
137148
categories: [
138149
{

0 commit comments

Comments
 (0)