Skip to content

Commit

Permalink
bench: format duration
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Sep 15, 2024
1 parent df86ee2 commit a0a860b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion code-pushup.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import {CoreConfig} from "@code-pushup/models";
import nxPerformancePlugin from "./tooling/measures/nx-performance/nx-performance.plugin";

const tasks = ['cli-e2e:e2e', 'cli-e2e-original:original-e2e'];
const tasks = [
'cli-e2e:e2e', 'cli-e2e-original:original-e2e'
];
export default {
plugins: [
nxPerformancePlugin({
Expand Down
4 changes: 2 additions & 2 deletions tooling/measures/nx-performance/audit/project-task.audit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {AuditOutput, Audit} from "@code-pushup/models";
import {executeProcess, slugify} from "@code-pushup/utils";
import {executeProcess, slugify, formatDuration} from "@code-pushup/utils";
import {logger, readJsonFile} from "@nx/devkit";


Expand Down Expand Up @@ -42,7 +42,7 @@ export async function projectTaskAudits(options?: ProjectTaskAuditOptions): Prom
slug: getAuditSlug(task), // Unique slug for each task
score: scoreProjectTaskDuration(duration, maxDuration),
value: duration,
displayValue: `${duration.toFixed(2)} ms`,
displayValue: formatDuration(duration),
details: {}
}));
}
Expand Down

0 comments on commit a0a860b

Please sign in to comment.