Keep per-machine stats

[?]
Jun 22, 2015, 3:11 PM
O64P4XJSK56UN73VA5JUAM4RHFDWOZJDDYKVOKMUB736ODOAUYNAC

Dependencies

  • [2] K5G5GZY7 Guard against concurrent invocations of hydra-queue-runner
  • [3] 63W4T5PU hydra-queue-runner: More stats
  • [4] N5O7VEEO Immediately abort builds that require an unsupported system type
  • [5] RQUAATWB Add status dump facility
  • [6] 5AIYUMTB Basic remote building
  • [7] HUUZFPPK Fix race between the queue monitor and the builder threads
  • [8] NNOCZ4RO hydra-queue-runner: Improve dispatcher
  • [9] OCZ4LSGG Automatically retry aborted builds
  • [10] PLOZBRTR Add command ‘hydra-queue-runner --status’ to show current status
  • [*] 24BMQDZA Start of single-process hydra-queue-runner
  • [*] PQFOMNTL hydra-queue-runner: More stats
  • [*] ENXUSMSV Make concurrency more robust
  • [*] NJJ7H64S Very basic multi-threaded queue runner

Change contents

  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 180
    [4.6162][4.22:68]()
    std::atomic<unsigned int> currentJobs{0};
    [4.6162]
    [4.6]
    counter currentJobs{0};
    counter nrStepsDone{0};
    counter totalStepTime{0}; // total time for steps, including closure copying
    counter totalStepBuildTime{0}; // total build time for steps
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 247
    [4.27]
    [13.46]
    time_t startedAt;
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1306
    [14.9570]
    [3.394]
    // FIXME: keep stats about aborted steps?
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1310
    [3.526]
    [3.526]
    machine->nrStepsDone++;
    machine->totalStepTime += stepStopTime - stepStartTime;
    machine->totalStepBuildTime += result.stopTime - result.startTime;
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1434
    [4.372]
    [4.372]
    time_t now = time(0);
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1437
    [4.443]
    [4.443]
    root.attr("uptime", now - startedAt);
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1462
    [4.1458][3.528:640]()
    root.attr("totalStepTime", totalStepTime);
    root.attr("totalStepBuildTime", totalStepBuildTime);
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1463
    [3.667]
    [3.667]
    root.attr("totalStepTime", totalStepTime);
    root.attr("totalStepBuildTime", totalStepBuildTime);
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 1479
    [4.1939][4.1939:1992]()
    nested2.attr("maxJobs", m->maxJobs);
    [4.1939]
    [4.1992]
    nested2.attr("nrStepsDone", m->nrStepsDone);
    if (m->nrStepsDone) {
    nested2.attr("totalStepTime", m->totalStepTime);
    nested2.attr("totalStepBuildTime", m->totalStepBuildTime);
    nested2.attr("avgStepTime"); out << (float) m->totalStepTime / m->nrStepsDone;
    nested2.attr("avgStepBuildTime"); out << (float) m->totalStepBuildTime / m->nrStepsDone;
    }
  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1569
    [15.3200]
    [2.529]
    startedAt = time(0);