Skip to content

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