Keep better bytesReceived/bytesSent stats
[?]
Feb 26, 2016, 3:16 PM
DIEY5USNXFN6O2ARZ5IPBS2VX4OH7KE4RMX2JWAWTVMMSYA6GREACDependencies
- [2]
RSISSEU6Enable substitution on the build machines - [3]
UVNTWTWGPrevent download of NARs we just uploaded - [4]
6TY4LNHHFinish copyClosure - [5]
FITVNQ2SKeep track of the time we spend copying to/from build machines - [6]
NAYQT2GThydra-queue-runner: Use cmdBuildDerivation - [7]
73YR46NJhydra-queue-runner: Write directly to a binary cache - [8]
6EO3HVNAMerge remote-tracking branch 'origin/master' into binary-cache - [9]
MB3TISH2Rate-limit the number of threads copying closures at the same time - [10]
DKJFD6JNProcess Nix API changes - [11]
DWFTK56EKeep track of how many threads are waiting - [12]
5AIYUMTBBasic remote building - [13]
A2GL5FOZMoar stats - [14]
N4IROACVMove buildRemote() into State - [15]
LE4VZIY5More stats - [16]
CNLNT3T4Allow only 1 thread to send a closure to a given machine at the same time - [17]
OCZ4LSGGAutomatically retry aborted builds - [*]
24BMQDZAStart of single-process hydra-queue-runner
Change contents
- edit in src/hydra-queue-runner/build-remote.cc at line 11
#include "finally.hh" - edit in src/hydra-queue-runner/build-remote.cc at line 79
counter & bytesSent, - edit in src/hydra-queue-runner/build-remote.cc at line 105
for (auto & p : missing)bytesSent += destStore->queryPathInfo(p).narSize; - edit in src/hydra-queue-runner/build-remote.cc at line 115[4.2443]→[4.388:438](∅→∅),[4.438]→[3.0:124](∅→∅),[3.124]→[4.2561:2563](∅→∅),[4.231]→[4.2561:2563](∅→∅),[4.2561]→[4.2561:2563](∅→∅),[4.2563]→[4.92:132](∅→∅),[4.132]→[4.2664:2680](∅→∅),[4.2664]→[4.2664:2680](∅→∅),[4.2680]→[3.125:176](∅→∅),[3.176]→[4.232:260](∅→∅),[4.480]→[4.232:260](∅→∅),[4.2717]→[4.232:260](∅→∅),[4.260]→[4.481:543](∅→∅),[4.318]→[4.2717:2721](∅→∅),[4.543]→[4.2717:2721](∅→∅),[4.2717]→[4.2717:2721](∅→∅)
static void copyClosureFrom(ref<Store> destStore,FdSource & from, FdSink & to, const PathSet & paths, counter & bytesReceived,std::shared_ptr<FSAccessor> accessor){to << cmdExportPaths << 0 << paths;to.flush();destStore->importPaths(false, from, accessor);for (auto & p : paths)bytesReceived += destStore->queryPathInfo(p).narSize;} - edit in src/hydra-queue-runner/build-remote.cc at line 139
Finally updateStats([&]() {bytesReceived += from.read;bytesSent += to.written;}); - replacement in src/hydra-queue-runner/build-remote.cc at line 231
copyClosureTo(destStore, from, to, inputs, bytesSent, true);copyClosureTo(destStore, from, to, inputs, true); - replacement in src/hydra-queue-runner/build-remote.cc at line 294
copyClosureFrom(destStore, from, to, outputs, bytesReceived, result.accessor);to << cmdExportPaths << 0 << outputs;to.flush();destStore->importPaths(false, from, result.accessor); - file addition: finally.hh[19.187]
#pragma once/* A trivial class to run a function at the end of a scope. */class Finally{private:std::function<void()> fun;public:Finally(std::function<void()> fun) : fun(fun) { }~Finally() { fun(); }};