Keep track of the number of build steps that are being built

[?]
Jun 22, 2015, 9:23 AM
7LB6QBXYOGU43UDLJDJQZFGT4XDALULXDF3WX3WWHL7X3JTB54CQC

Dependencies

  • [2] WKJFPR77 hydra-queue-runner: Maintain count of active build steps
  • [3] ENXUSMSV Make concurrency more robust
  • [4] 5AIYUMTB Basic remote building
  • [5] 24BMQDZA Start of single-process hydra-queue-runner
  • [6] NJJ7H64S Very basic multi-threaded queue runner
  • [7] RYTQLATY Keep track of failed paths in the Hydra database
  • [8] OCZ4LSGG Automatically retry aborted builds
  • [9] HHOMBU7G hydra-queue-runner: Implement timeouts
  • [10] PQFOMNTL hydra-queue-runner: More stats
  • [*] YZAI5GQU Implement a database connection pool

Change contents

  • replacement in src/hydra-queue-runner/build-remote.cc at line 117
    [3.85][3.85:112]()
    RemoteResult & result)
    [3.85]
    [3.2925]
    RemoteResult & result, counter & nrStepsBuilding)
  • replacement in src/hydra-queue-runner/build-remote.cc at line 179
    [3.4400][3.4400:4429]()
    int res = readInt(from);
    [3.4400]
    [3.4429]
    int res;
    {
    MaintainCount mc(nrStepsBuilding);
    res = readInt(from);
    }
  • edit in src/hydra-queue-runner/build-remote.hh at line 5
    [3.5314]
    [3.5314]
    #include "counter.hh"
  • replacement in src/hydra-queue-runner/build-remote.hh at line 25
    [3.295][3.295:323]()
    RemoteResult & result);
    [3.295]
    RemoteResult & result, counter & nrStepsBuilding);
  • file addition: counter.hh (----------)
    [3.187]
    #pragma once
    #include <atomic>
    typedef std::atomic<unsigned int> counter;
    struct MaintainCount
    {
    counter & c;
    MaintainCount(counter & c) : c(c) { c++; }
    ~MaintainCount() { c--; }
    };
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 22
    [12.19]
    [3.19]
    #include "counter.hh"
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 45
    [3.907][3.0:1]()
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 46
    [3.2][3.2:45]()
    typedef std::atomic<unsigned int> counter;
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 47
    [3.908][2.84:204](),[2.204][3.908:909](),[3.908][3.908:909](),[3.909][2.205:206]()
    struct MaintainCount
    {
    counter & c;
    MaintainCount(counter & c) : c(c) { c++; }
    ~MaintainCount() { c--; }
    };
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 246
    [2.237]
    [3.132]
    counter nrStepsBuilding{0};
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 1089
    [3.1161][3.1161:1237]()
    logDir, build->maxSilentTime, build->buildTimeout, result);
    [3.1161]
    [3.1108]
    logDir, build->maxSilentTime, build->buildTimeout, result, nrStepsBuilding);
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1427
    [2.351]
    [3.431]
    printMsg(lvlError, format("%1% build steps currently building") % nrStepsBuilding);