Skip to content

Commit

Permalink
wip 3
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Oct 13, 2024
1 parent ae04d94 commit b37c393
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { execFile } from 'node:child_process';
import { promisify } from 'node:util';

export const DEFAULT_MAX_PROJECT_GRAPH_TIME = 300;

export const PROJECT_GRAPH_PERFORMANCE_AUDIT_SLUG = 'graph-time-project';
export const PROJECT_GRAPH_PERFORMANCE_AUDIT = {
slug: PROJECT_GRAPH_PERFORMANCE_AUDIT_SLUG,
Expand All @@ -15,7 +14,7 @@ export type ProjectGraphAuditOptions = {
maxProjectGraphTime?: number;
};

export async function projectGraphAudit(
export async function graphProjectTimeAudit(
options?: ProjectGraphAuditOptions
): Promise<AuditOutput> {
const { maxProjectGraphTime = DEFAULT_MAX_PROJECT_GRAPH_TIME } =
Expand Down
8 changes: 4 additions & 4 deletions tooling/measures/nx-performance/nx-performance.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { PLUGIN_SLUG } from './constant';
import {
PROJECT_GRAPH_PERFORMANCE_AUDIT,
PROJECT_GRAPH_PERFORMANCE_AUDIT_SLUG,
projectGraphAudit,
graphProjectTimeAudit,
ProjectGraphAuditOptions,
} from './audit/project-graph.audit';
} from './audit/graph-project-time.audit';
import {
getTaskTimeAudits,
TaskTimeAuditOptions,
Expand All @@ -28,7 +28,7 @@ import {
TASK_GRAPH_TIME_AUDIT_POSTFIX,
TaskGraphAuditOptions,
taskGraphAudits,
} from './audit/task-graph.audit';
} from './audit/graph-task-time.audit';

export const nxPerformanceAudits = ({
taskTimeTasks,
Expand Down Expand Up @@ -139,7 +139,7 @@ export async function runnerFunction(
const onlyAuditsSet = new Set(onlyAudits);
return [
...(onlyAuditsSet.has(PROJECT_GRAPH_PERFORMANCE_AUDIT_SLUG)
? [await projectGraphAudit({ maxProjectGraphTime })]
? [await graphProjectTimeAudit({ maxProjectGraphTime })]
: []),
...(onlyAuditsSet.has(CACHE_SIZE_AUDIT_POSTFIX)
? await cacheSizeAudits({ maxCacheSize, cacheSizeTasks })
Expand Down

0 comments on commit b37c393

Please sign in to comment.