Add input files metrics to Seqera executor task submission#6790
Draft
pditommaso wants to merge 2 commits intoschedfrom
Draft
Add input files metrics to Seqera executor task submission#6790pditommaso wants to merge 2 commits intoschedfrom
pditommaso wants to merge 2 commits intoschedfrom
Conversation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
This change adds telemetry about input files (count, total size, and size
distribution) to the task submission payload sent to the Sched API.
Key changes:
- Add InputFilesComputer to compute file metrics from TaskRun.inputFiles
- Follows symlinks and recursively computes directory sizes
- Logs warnings on access failures, graceful degradation
- Modify SeqeraBatchSubmitter for async metrics computation:
- Uses dedicated thread pool (max 10 threads) for parallel computation
- Computation starts at enqueue(), resolved at flush time
- Configurable timeout via NXF_SEQERA_METRICS_TIMEOUT (default 30s)
- Update sched-client dependency to 0.16.0
The metrics payload structure:
{
"inputFilesMetrics": {
"count": 12,
"totalBytes": 4500000000,
"bins": [
{"range": "<=1MB", "count": 2},
{"range": "<=10MB", "count": 5},
...
]
}
}
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
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
InputFilesComputerto compute file metrics from task input filesSeqeraBatchSubmitterfor async metrics computation using a dedicated thread poolChanges
InputFilesComputer.groovySeqeraBatchSubmitter.groovyInputFilesComputerTest.groovybuild.gradleMetrics Payload Structure
{ "inputFilesMetrics": { "count": 12, "totalBytes": 4500000000, "bins": [ {"range": "<=1MB", "count": 2}, {"range": "<=10MB", "count": 5}, {"range": "<=100MB", "count": 3}, {"range": "<=1GB", "count": 2}, {"range": ">1GB", "count": 0} ] } }Configuration
NXF_SEQERA_METRICS_TIMEOUTTest plan
InputFilesComputer🤖 Generated with Claude Code