Skip to content

feat: add profiling utilities for performance measurement#16130

Open
JarrodMFlesch wants to merge 5 commits intomainfrom
perf/profiling-utilities
Open

feat: add profiling utilities for performance measurement#16130
JarrodMFlesch wants to merge 5 commits intomainfrom
perf/profiling-utilities

Conversation

@JarrodMFlesch
Copy link
Copy Markdown
Contributor

Adds a flag-gated profiling utility for measuring execution time of code paths during Payload initialization. Enable with PAYLOAD_DEBUG_TIMING=true.

The utility provides timeSync() and timeAsync() wrappers that use Node's Performance API to collect timing data, with printProfileResults() to output aggregated results. When disabled, the wrappers have zero overhead (just return the wrapped function's result).

Includes a test config in test/profiling/ with 30 collections of 4-level nested fields for benchmarking sanitizeConfig and similar initialization paths.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant