From ba96a13407fcca5d637c0dd162cfb8b2c9cb8bd0 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Fri, 21 Jan 2022 15:35:47 -0500 Subject: [PATCH] Record metrics when getting the closure to localhost --- src/hydra-queue-runner/build-remote.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/hydra-queue-runner/build-remote.cc b/src/hydra-queue-runner/build-remote.cc index a82e911e..e9fdb293 100644 --- a/src/hydra-queue-runner/build-remote.cc +++ b/src/hydra-queue-runner/build-remote.cc @@ -270,21 +270,24 @@ void State::buildRemote(ref destStore, copyPaths(*localStore, *destStore, closure, NoRepair, NoCheckSigs, NoSubstitute); } - /* Copy the input closure. */ - if (machine->isLocalhost()) { - StorePathSet closure; - destStore->computeFSClosure(inputs, closure); - copyPaths(*destStore, *localStore, closure, NoRepair, NoCheckSigs, NoSubstitute); - } else { + { auto mc1 = std::make_shared>(nrStepsWaiting); mc1.reset(); MaintainCount mc2(nrStepsCopyingTo); + printMsg(lvlDebug, "sending closure of ā€˜%sā€™ to ā€˜%sā€™", localStore->printStorePath(step->drvPath), machine->sshName); auto now1 = std::chrono::steady_clock::now(); - copyClosureTo(machine->state->sendLock, destStore, from, to, inputs, true); + /* Copy the input closure. */ + if (machine->isLocalhost()) { + StorePathSet closure; + destStore->computeFSClosure(inputs, closure); + copyPaths(*destStore, *localStore, closure, NoRepair, NoCheckSigs, NoSubstitute); + } else { + copyClosureTo(machine->state->sendLock, destStore, from, to, inputs, true); + } auto now2 = std::chrono::steady_clock::now();