Skip to content
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

print delta startup timing with DELTA_DEBUG_TIMING=1 env var #1910

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

th1000s
Copy link
Collaborator

@th1000s th1000s commented Nov 19, 2024

If this env var is set, on exit delta will print how long reading the config files, setting up the tty, querying the calling process and painting the first line took, in absolute ms from the start of main().

Note: The process time reports when it was first requested, not when it finished. This may be much later than the first paint.

E.g. on git show:

delta timings (ms after start): tty setup: 2.3 ms, read configs: 6.0 ms, query processes: 26.1 ms, first paint: 10.1


These measurements are cheap and could always be taken. If a certain component is slow (regularly, but where to store that information?), then print a notice on exit, e.g. "Your terminal seems slow, maybe set --light in your config".

If this env var is set, on exit delta will print how long reading the
config files, setting up the tty, querying the calling process and
painting the first line took, in absolute ms from the start of `main()`.

Note: The process time reports when it was first requested, not when it
finished. This may be much later than the first paint.

E.g. on `git show`:

delta timings (ms after start): tty setup: 2.3 ms, read configs: 6.0 ms, query processes: 26.1 ms, first paint: 10.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant