Keep track of how many threads are waiting

[?]
Jul 10, 2015, 5:10 PM
DWFTK56EAGNPSKWWWY5MFPATQWO5PZGHF5D53JOEJ2DG5NLLYRBQC

Dependencies

  • [2] ZTVVUMTK JSONObject doesn't handle 64-bit integers
  • [3] N4IROACV Move buildRemote() into State
  • [4] CNLNT3T4 Allow only 1 thread to send a closure to a given machine at the same time
  • [5] OCZ4LSGG Automatically retry aborted builds
  • [6] LE4VZIY5 More stats
  • [7] A2GL5FOZ Moar stats
  • [8] 5AIYUMTB Basic remote building
  • [*] 24BMQDZA Start of single-process hydra-queue-runner
  • [*] HJOEIMLR Refactor
  • [*] DODOGD7M Send queue runner stats to statsd

Change contents

  • replacement in src/hydra-queue-runner/build-remote.cc at line 182
    [3.873][3.873:989](),[5.594][5.161:205](),[3.989][5.161:205](),[5.161][5.161:205]()
    printMsg(lvlDebug, format("sending closure of ‘%1%’ to ‘%2%’") % step->drvPath % machine->sshName);
    MaintainCount mc(nrStepsCopyingTo);
    [3.873]
    [4.26]
    auto mc1 = std::make_shared<MaintainCount>(nrStepsWaiting);
  • edit in src/hydra-queue-runner/build-remote.cc at line 184
    [4.98]
    [4.98]
    mc1.reset();
    MaintainCount mc2(nrStepsCopyingTo);
    printMsg(lvlDebug, format("sending closure of ‘%1%’ to ‘%2%’") % step->drvPath % machine->sshName);
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1286
    [5.818]
    [2.0]
    root.attr("nrStepsWaiting", nrStepsWaiting);
  • edit in src/hydra-queue-runner/state.hh at line 206
    [11.5760]
    [11.5760]
    counter nrStepsWaiting{0};
  • edit in src/script/hydra-send-stats at line 32
    [5.1045]
    [12.1059]
    gauge("hydra.queue.steps.waiting", $json->{nrStepsWaiting});