Skip to content

[perf] Profile possibly slow functions #1491

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

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Conversation

mikeland73
Copy link
Contributor

Summary

Profile a few functions. This shows any function that takes more than 1 ms.

Q: does trace have this functionality? It looks like it does time events but we have to explicitly enable it using the trace flag?

How was it tested?

export DEVBOX_PRINT_EXEC_TIME=1

devbox add curl
...
Exec times over 1ms:
"syncPackagesToProfile" took 343.118292ms
"nixEnv" took 128.018333ms
"nixEnv" took 128.219083ms
"CreateWrappers" took 257.527167ms
"ensurePackagesAreInstalled" took 768.378084ms
"CreateWrappers" took 2.56ms
"devbox add curl" took 1.21434s

Copy link
Contributor

@Lagoja Lagoja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this out locally and it seems to work as expected. Surprisingly few functions seem to go over 1ms though.

@mikeland73 mikeland73 merged commit bc92b10 into main Sep 19, 2023
@mikeland73 mikeland73 deleted the landau/profile-slow-fn branch September 19, 2023 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants