From bc796aef942b02826ed5a14c3778fc5b45960f4a Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 4 Aug 2021 15:08:28 +1000 Subject: Halve the bulkSims value each time we wait. Coz by this time lots of sims are likely still starting up. --- src/sledjchisl/sledjchisl.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 65f51f0..698a251 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -8095,20 +8095,20 @@ fcgiDone: { I("Tmux tab [%d:%s](pane %d) tmux ID %s, from %s/sim%d - %s is starting.", window, type, pane, simd->paneID, scTemp, count, simd->name); doTmuxCmd("select-pane -t %s:%s -T '%s'", Tconsole, simd->paneID, simd->tab); - { - snprintf(toybuf, sizeof(toybuf), "mono OpenSim.exe -inidirectory=%s/sim%d", scTemp, count); - sendTmuxCmd(simd->paneID, toybuf); + snprintf(toybuf, sizeof(toybuf), "mono OpenSim.exe -inidirectory=%s/sim%d", scTemp, count); + sendTmuxCmd(simd->paneID, toybuf); // TODO - some compromise, do a premptive load check if we are not doing a wait anyway. - if (0 == doWait) - { - snprintf(toybuf, sizeof(toybuf), "INITIALIZATION COMPLETE FOR %s", simd->name); - waitTmuxText(simd->paneID, toybuf); - I("%s is done starting up.", simd->name); - la = waitLoadAverage(la, loadAverageInc, simTimeOut); - } - count++; - doWait = (count % bulkSims); + if (0 == doWait) + { +// doTmuxCmd("select-window -t %s:%d", Tconsole, simd->window); + snprintf(toybuf, sizeof(toybuf), "INITIALIZATION COMPLETE FOR %s", simd->name); + waitTmuxText(simd->paneID, toybuf); + I("%s is done starting up.", simd->name); + la = waitLoadAverage(la, loadAverageInc, simTimeOut); + if (1 < bulkSims) + bulkSims = bulkSims / 2; } + doWait = ((count + 1) % bulkSims); } break; } -- cgit v1.1