nextflow-io / nextflow-io/nextflow
TraceRecord field `realtime` differs from documentation
Nobody has claimed this yet.
- Dominant language
- Groovy
- Stars
- 3.5k
- Forks
- 811
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 61
Description
Bug report
Expected behavior and actual behavior
In the Nextflow documentation realtime is described as
**realtime**
Task execution time i.e. delta between completion and start timestamp.
I found that this is often not true and quite by a lot. See the following raw trace:
submit duration realtime start complete
1774271746328 16901 8000 1774271746424 1774271763229
1774271763256 35975 6000 1774271766533 1774271799231
Now you can subtract complete - start.
For the first line this is 1774271763229 - 1774271746424 = 16805. This does not correspond to realtime given at 8000 or exactly 8s.
While the correct value is initially set
https://github.com/nextflow-io/nextflow/blob/00f35b3a9f672c779c4d4baec14e877f27ee4bb7/modules/nextflow/src/main/groovy/nextflow/processor/TaskHandler.groovy#L239
it is replaced a few lines later
https://github.com/nextflow-io/nextflow/blob/00f35b3a9f672c779c4d4baec14e877f27ee4bb7/modules/nextflow/src/main/groovy/nextflow/processor/TaskHandler.groovy#L246
Steps to reproduce the problem
Run nextflow run nf-core/demo -r 1.1.0 -profile test,docker and look at the execution_trace_<timestamp>.txt file's realtime vs complete - start value.
Environment
- Nextflow version: 25.10.4
Either the documentation is wrong and should be changed or the value should not be overwritten / a new walltime parameter introduced.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced lines in modules/nextflow/src/main/groovy/nextflow/processor/TaskHandler.groovy and the realtime entry in modules/nextflow/src/main/resources/nextflow/executor/command-trace.txt. Reproduce with nf-core/demo using the stated Docker profile, compare realtime with complete minus start, and determine whether the implementation or the documentation should define the final value. Done means the trace behavior and documentation agree, with coverage for the corrected interpretation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- backend, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100