Skip to content

Draft: Stagger subprocesses in finalsink

Resolves #108

This should split up each subprocess in finalsink.

calcfap processes should be evenly spaced: fapupdater_interval / num_stats (num_stats was what I called the number of timescales, should probably be num_walltimes for consistency)

snapshot processes (dumping zerolags, segments, and combining stats) are also evenly split, but all offset by fapupdater_interval / (num_stats * 2).

That Should mean that we have something like

1/6 interval 2/6 interval 3/6 interval 4/6 interval 5/6 interval 6/6 interval
calcfap_2h snapshotproc calcfap_1d ------------ calcfap_2w ------------

where snapshotproc May be filled with one of the 3 processes that run once every 24h.

I'm only setting these offsets as the initial state. I'm pretty sure that they should then stay in sync, seeing as we've essentially made finalsink synchronous with the mutex it holds for appsink_new_buffer.

Draft:

There's a fair bit which I think looks Gross in this (a lot of repeated patterns), but I'm not sure if there's a cleaner way to do things.

Would appreciate any feedback on bad code patterns/styles and such.

It still needs building & testing. I'll do an injection test, and Luke will launch an MDC run to check if this helps.

Merge request reports

Loading