Skip to content

Add per-epoch setup() fluent API#1

Closed
l0rinc wants to merge 1 commit intomasterfrom
l0rinc/per-epoch-setup
Closed

Add per-epoch setup() fluent API#1
l0rinc wants to merge 1 commit intomasterfrom
l0rinc/per-epoch-setup

Conversation

@l0rinc
Copy link
Copy Markdown
Owner

@l0rinc l0rinc commented Jan 3, 2026

Add Bench::setup(...).run(...) for untimed per-epoch setup. The existing run() now delegates to runImpl() with an empty setup lambda.

Tests verify setup is excluded from timing (50ms sleep → ~0 measured) and runs once before each epoch's iterations (S-RRR-S-RRR pattern).

Fixed: martinus#130
Alternative to: martinus#135

Add Bench::setup(...).run(...) for untimed per-epoch setup.
The existing run() now delegates to runImpl() with an empty setup lambda.

Tests verify setup is excluded from timing (50ms sleep → ~0 measured) and runs once before each epoch's iterations (S-RRR-S-RRR pattern).
@l0rinc l0rinc marked this pull request as ready for review January 3, 2026 10:35
@l0rinc l0rinc closed this Jan 3, 2026
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.

Add setup/cleanup hooks to exclude per-iteration overhead from timing

1 participant