Skip to content

feat(vitest): call setup and teardown when running suite - #46

Closed
GuillaumeLagrange wants to merge 1 commit into
mainfrom
cod-1161-support-benchmark-hooks-in-vitest
Closed

feat(vitest): call setup and teardown when running suite#46
GuillaumeLagrange wants to merge 1 commit into
mainfrom
cod-1161-support-benchmark-hooks-in-vitest

Conversation

@GuillaumeLagrange

Copy link
Copy Markdown
Contributor

No description provided.

@GuillaumeLagrange
GuillaumeLagrange marked this pull request as draft July 18, 2025 14:06
@codspeed-hq

codspeed-hq Bot commented Jul 18, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #46 will not alter performance

Comparing cod-1161-support-benchmark-hooks-in-vitest (c475504) with main (6df11e8)

Summary

✅ 86 untouched benchmarks

@GuillaumeLagrange
GuillaumeLagrange deleted the cod-1161-support-benchmark-hooks-in-vitest branch August 19, 2025 10:07
adriencaccia added a commit that referenced this pull request Sep 1, 2026
…is mode

The analysis runner drives each benchmark itself instead of handing it to
tinybench, and it never read the `setup` and `teardown` hooks a benchmark
declares through its options, so they were silently skipped in simulation
and memory modes. Walltime mode was unaffected: it delegates to Vitest's
default execution, where tinybench invokes them.

Build the same Bench and Task Vitest builds for a benchmark, and call the
hooks around the warmup and the measured run, matching tinybench's cycle
semantics and keeping them outside the instrumentation window.

Supersedes #46
Co-Authored-By: Claude <noreply@anthropic.com>
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