Skip to content

[heft] feat: add new task-level timing metrics #5232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

aramissennyeydd
Copy link
Contributor

Summary

Adds task-level metrics for reporting on how long specific plugins take to execute, like the Typescript, Jest, and Webpack plugins. These are currently only logged out to console in verbose mode.

Details

I copied most of the existing implementation of the recordMetrics hook to create a recordTaskMetrics hook - the idea here is being able to report on the specific amount of time that each task takes and add more granular reporting. Let me know what you think about the metric envelope.

How it was tested

Added a test heft-lifecycle-plugin that logs out the time taken for each task (you can still see the verbose logs too). Example:

[build:api-extractor] Finished task execution (651.9908750000002ms)
[lifecycle:example-lifecycle-plugin] Finished build:api-extractor in 651.99ms
[build:metadata-test] Finished task execution (652.479875ms)
[lifecycle:example-lifecycle-plugin] Finished build:metadata-test in 652.48ms

Impacted documentation

Not sure?

Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
@iclanton iclanton moved this from Needs triage to In Progress in Bug Triage May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant