Skip to content

Conversation

@maurycy
Copy link
Contributor

@maurycy maurycy commented Jan 24, 2026

The PR adds support for profiling benchmarks with a Tachyon hook.

It's enabled only during benchmark execution. It supports nearly all flags as environment variables, and there's a guard for versions below 3.15. It's disabled on Windows, since I don't have access to any.

I'm not sure if this should be merged before October 2026, but it's a good way to verify Tachyon itself and offers a new way to profile the whole pyperformance suite.

Basic way to test:

uv run --python 3.15 -m pyperf timeit --hook tachyon '[x**2 for x in range(1000)]'

pyperformance

I was able to run the whole pyperformance suite with it:

PYPERF_TACHYON_EXTRA_OPTS="--flamegraph" \
PYTHONPATH=/home/maurycy/github.com/maurycy/pyperf \
uv run --python 3.15 --with /home/maurycy/github.com/maurycy/pyperf/pyperformance \
python -c "import pyperformance.cli; pyperformance.cli.main()" run \
  --fast \
  --hook tachyon \
  --inherit-environ PYPERF_TACHYON_EXTRA_OPTS

notes

  • Beyond the scope, but the hook subsystem could be more granular (any interest?), so WorkerTask etc. wouldn't be included,
  • profiling.sampling does not seem to offer a way to stop, except killing the process (not the urgent priority),
  • What would be the best way to write a test for it?

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