diff options
| author | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-22 07:44:29 +0000 |
|---|---|---|
| committer | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-22 07:44:29 +0000 |
| commit | 5d8794d06ef30afcd5eb832c55e64c0e2f6508ef (patch) | |
| tree | 4474c6786b1d44c4c74c81e313bdada50908987b /src/json_errors.rs | |
| parent | 098bc6fcc8da84a3598e301c6527d2907df5252e (diff) | |
| download | genenetwork4-5d8794d06ef30afcd5eb832c55e64c0e2f6508ef.tar.gz | |
compute: report where the time went, per phase and per step
`meta.took_ms` is one number and it has misled twice: a warm re-request reports
the cache's speed, not the engine's, and a client cutoff looks like a failure.
A compute reply now carries `meta.timing` beside it:
engine gemma | pangemma
phases[] artifacts (state: built|reused|none), workflow, parse
cluster {jobs_submitted, run_ms_sum, run_ms_max, queue_ms_sum}
steps[] one per CWL step instance: step, chr, compute_ms, state
steps_summary n, compute_ms_sum, compute_ms_max, cached
Three decisions worth their words:
- **states, not just durations.** A cached step's log is still in ravanan's
store with the figure from when it ran, so every number carries `ran` or
`cached`: a warm answer's step times are the original run's, not this
request's work. The state comes from the log's mtime against the request's
start, which is per step and needs no cooperation from ravanan.
- **`jobs_submitted: 0` is the warm claim.** Slurm is asked once, after the
run, for the jobs it accepted since the request began. It is a count rather
than a boolean because a request can be half warm: a new trait over a known
panel re-uses every kinship matrix and runs only the GWA steps (measured:
20 of 40). Slurm's clock is one-second granular, so a sub-second job reports
0 run ms; the queue sum still shows the dispatch tick.
- **per-step figures come from the engines' own logs** (`## total computation
time`), which the workflow already returns for GWA and `-pve`. A scattered
step whose log is *not* a workflow output (kinship's) is located through the
job that ran it -- which is why ravanan now names jobs after the step's store
basename (separate commit, 1542662).
Measured on BXD.8 trait 10001, engine=pangemma:
warm: took_ms 4704, artifacts reused, 0 jobs, 20 steps all `cached`
(compute_ms_sum 16067 -- historical, as labelled), workflow 3687
cold: took_ms 10012, 20 jobs (kinship re-used, GWA ran), 20 steps `ran`,
compute_ms_sum 15872, workflow 9043
bin/monitor-gn4 reads `meta.timing.engine` instead of parsing note text, and
reports the cache state with it ("engine: gemma, warm").
Diffstat (limited to 'src/json_errors.rs')
0 files changed, 0 insertions, 0 deletions
