Moar stats

[?]
Jun 25, 2015, 2:46 PM
A2GL5FOZ3UJ2NM5RPRWTNPFTKLBA54B2UC6UIYO4M3N3RFNC4BTAC

Dependencies

  • [2] LE4VZIY5 More stats
  • [3] 5LBMP7GA Fix remote building
  • [4] 7LB6QBXY Keep track of the number of build steps that are being built
  • [5] 5AIYUMTB Basic remote building
  • [6] 6TY4LNHH Finish copyClosure
  • [7] MB3TISH2 Rate-limit the number of threads copying closures at the same time
  • [8] HHOMBU7G hydra-queue-runner: Implement timeouts
  • [9] RYTQLATY Keep track of failed paths in the Hydra database
  • [10] OCZ4LSGG Automatically retry aborted builds
  • [11] 7VQ4ALFY Update "make check" for the new queue runner
  • [*] 24BMQDZA Start of single-process hydra-queue-runner
  • [*] PQFOMNTL hydra-queue-runner: More stats
  • [*] GS4BE6TB Asynchronously compress build logs
  • [*] PLOZBRTR Add command ‘hydra-queue-runner --status’ to show current status
  • [*] DODOGD7M Send queue runner stats to statsd

Change contents

  • replacement in src/hydra-queue-runner/build-remote.cc at line 74
    [3.1406][3.0:42]()
    TokenServer & copyClosureTokenServer,
    [3.1406]
    [3.1406]
    TokenServer & copyClosureTokenServer, counter & bytesSent,
  • edit in src/hydra-queue-runner/build-remote.cc at line 117
    [3.78]
    [3.285]
    for (auto & p : missing)
    bytesSent += store->queryPathInfo(p).narSize;
  • replacement in src/hydra-queue-runner/build-remote.cc at line 131
    [3.2504][3.2504:2561]()
    FdSource & from, FdSink & to, const PathSet & paths)
    [3.2504]
    [3.2561]
    FdSource & from, FdSink & to, const PathSet & paths, counter & bytesReceived)
  • edit in src/hydra-queue-runner/build-remote.cc at line 138
    [3.2717]
    [3.2717]
    for (auto & p : paths)
    bytesReceived += store->queryPathInfo(p).narSize;
  • replacement in src/hydra-queue-runner/build-remote.cc at line 149
    [2.65][2.65:154]()
    counter & nrStepsBuilding, counter & nrStepsCopyingTo, counter & nrStepsCopyingFrom)
    [2.65]
    [3.2925]
    counter & nrStepsBuilding, counter & nrStepsCopyingTo, counter & nrStepsCopyingFrom,
    counter & bytesSent, counter & bytesReceived)
  • replacement in src/hydra-queue-runner/build-remote.cc at line 198
    [3.3911][3.756:853](),[3.853][2.155:161]()
    printMsg(lvlDebug, format("sending closure of ‘%1%’ to ‘%2%’") % drvPath % sshName);
    {
    [3.3911]
    [2.161]
    if (sshName != "localhost") {
    printMsg(lvlDebug, format("sending closure of ‘%1%’ to ‘%2%’") % drvPath % sshName);
  • replacement in src/hydra-queue-runner/build-remote.cc at line 201
    [2.205][2.205:277]()
    copyClosureTo(store, from, to, inputs, copyClosureTokenServer);
    [2.205]
    [2.277]
    copyClosureTo(store, from, to, inputs, copyClosureTokenServer, bytesSent);
  • replacement in src/hydra-queue-runner/build-remote.cc at line 230
    [3.4825][3.942:1041](),[3.1041][3.4924:5027](),[3.4924][3.4924:5027](),[3.5027][2.284:290]()
    printMsg(lvlDebug, format("copying outputs of ‘%1%’ from ‘%2%’") % drvPath % sshName);
    PathSet outputs;
    for (auto & output : drv.outputs)
    outputs.insert(output.second.path);
    {
    [3.4825]
    [2.290]
    if (sshName != "localhost") {
    printMsg(lvlDebug, format("copying outputs of ‘%1%’ from ‘%2%’") % drvPath % sshName);
    PathSet outputs;
    for (auto & output : drv.outputs)
    outputs.insert(output.second.path);
  • replacement in src/hydra-queue-runner/build-remote.cc at line 236
    [2.336][2.336:387]()
    copyClosureFrom(store, from, to, outputs);
    [2.336]
    [2.387]
    copyClosureFrom(store, from, to, outputs, bytesReceived);
  • replacement in src/hydra-queue-runner/build-remote.hh at line 27
    [2.459][2.459:549]()
    counter & nrStepsBuilding, counter & nrStepsCopyingTo, counter & nrStepsCopyingFrom);
    [2.459]
    counter & nrStepsBuilding, counter & nrStepsCopyingTo, counter & nrStepsCopyingFrom,
    counter & bytesSent, counter & bytesReceived);
  • replacement in src/hydra-queue-runner/counter.hh at line 5
    [3.268][3.268:311]()
    typedef std::atomic<unsigned int> counter;
    [3.268]
    [3.311]
    typedef std::atomic<unsigned long> counter;
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 259
    [14.254]
    [15.714]
    counter bytesSent{0};
    counter bytesReceived{0};
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 1163
    [3.1265][2.619:699]()
    result, nrStepsBuilding, nrStepsCopyingTo, nrStepsCopyingFrom);
    [3.1265]
    [3.1108]
    result, nrStepsBuilding, nrStepsCopyingTo, nrStepsCopyingFrom,
    bytesSent, bytesReceived);
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1598
    [2.818]
    [16.1221]
    root.attr("bytesSent", bytesSent);
    root.attr("bytesReceived", bytesReceived);
  • edit in src/script/hydra-send-stats at line 47
    [17.1831]
    [17.1831]
    gauge("hydra.queue.bytes_sent", $json->{bytesSent});
    gauge("hydra.queue.bytes_received", $json->{bytesReceived});