nextflow-io / nextflow-io/nextflow

TraceRecord field `realtime` differs from documentation

Open
#6,954 3 comments 0 reactions 0 assignees View on GitHub

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

by this value
https://github.com/nextflow-io/nextflow/blob/9d65b9eead8887b7ba9a18050897aff58ef6fed7/modules/nextflow/src/main/resources/nextflow/executor/command-trace.txt#L206

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.