mrc-ide / rrq

:runner::runner::runner: Lightweight Redis queues
https://mrc-ide.github.io/rrq/
Other
24 stars 4 forks source link

Store times alongside tasks #61

Closed richfitz closed 2 years ago

richfitz commented 2 years ago

This does incur a small extra overhead but it's not that bad, and seems to disappear when you add a few workers.

This PR:

There are 3 reliable times we can get - the time of submission (perhaps that is uninteresting?), the time of task start (we know we want that!) and the time of task finishing. These are saved into 3 hashes at the points where we save job status back, which are all quite nicely defined.

Very open to new names (start/submit/complete), drawing a blank on something better

codecov[bot] commented 2 years ago

Codecov Report

Merging #61 (5a05645) into master (fe8cd2f) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #61   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines         1703      1722   +19     
=========================================
+ Hits          1703      1722   +19     
Impacted Files Coverage Δ
R/keys.R 100.00% <100.00%> (ø)
R/rrq_controller.R 100.00% <100.00%> (ø)
R/utils.R 100.00% <100.00%> (ø)
R/worker_run.R 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 257a9ed...5a05645. Read the comment docs.

richfitz commented 2 years ago

I think you should round in orderly.server, perhaps at serialisation - see https://github.com/vimc/orderly.server/pull/89/files#r789819453