ADR: benchmark process directive for per-task performance metrics#7146
Open
edmundmiller wants to merge 1 commit into
Open
ADR: benchmark process directive for per-task performance metrics#7146edmundmiller wants to merge 1 commit into
edmundmiller wants to merge 1 commit into
Conversation
Proposes a benchmark directive that emits per-task TraceRecord metrics to a user-specified TSV or JSONL file, with an optional repeats option that fans out into N independent task executions. Settable from nextflow.config so existing pipelines can be benchmarked without source changes. Signed-off-by: Claude <noreply@anthropic.com>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This ADR proposes a new
benchmarkprocess directive that enables per-task performance metrics collection with support for repeated execution to reduce measurement noise. The directive reuses Nextflow's existingTraceRecordinfrastructure and integrates seamlessly with the configuration system.Overview
The
benchmarkdirective addresses a gap in Nextflow's metrics capabilities by providing:nextflow.configusingwithNameandwithLabelselectors, enabling benchmarking of existing pipelines without source modificationrepeats: Nparameter that spawns N independent task executions and aggregates their metricsTraceRecord.FIELDSfor consistency with existing trace artifactsKey Design Decisions
TraceRecordcollection through the existing bash wrapper—no new probes or wrapper changes requiredTraceRecordfield names rather than aliasing to Snakemake conventionsDirective Syntax
Implementation Scope
The implementation is self-contained and minimal:
benchmarkto the standard process directive listProcessConfigBuilderBenchmarkclass mirroringPublishDirstructureTraceRecords to TSV/JSONL after all repeats completeNon-Goals
trace.txtandreport.htmlcover this)TraceRecord(e.g.,max_uss,max_pssare documented gaps)exec:blockshttps://claude.ai/code/session_01RW1UD9eQWkDLfR97WdegXk