Skip to content

Add env var to shut down kernel immediately after start for benchmarking - #1542

Draft
Carreau wants to merge 1 commit into
ipython:mainfrom
Carreau:startupbenchopt
Draft

Add env var to shut down kernel immediately after start for benchmarking#1542
Carreau wants to merge 1 commit into
ipython:mainfrom
Carreau:startupbenchopt

Conversation

@Carreau

@Carreau Carreau commented Aug 3, 2026

Copy link
Copy Markdown
Member

Setting IPYKERNEL_BENCHMARK_STARTUP_SHUTDOWN stops the event loop right after it starts, so total process wall-clock time measures kernel startup without needing an actual client to send a shutdown request.

This can be used in conjunction with -X importtime and profile viewer like tuna to work on speeding up importing and starting a kernel

Setting IPYKERNEL_BENCHMARK_STARTUP_SHUTDOWN stops the event loop right
after it starts, so total process wall-clock time measures kernel
startup without needing an actual client to send a shutdown request.

This can be used in conjunction with -X importtime and profile viewer
like tuna to work on speeding up importing and starting a kernel
@Carreau

Carreau commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

I'm fine not merging this, just a suggestion if anyone want to have it later, I can keep it as a local patch.

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.

2 participants