From b7bb627f674ce90d1a543bf3eab80b834bb592b2 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Fri, 31 Aug 2018 20:57:07 -0400 Subject: [PATCH 1/2] nix-build: print stats on sucessful builds --- src/nix-build/nix-build.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 21a0756a2..54d6b1db7 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -495,6 +495,7 @@ void mainWrapped(int argc, char * * argv) for (auto & path : outPaths) std::cout << path << '\n'; + state->printStats(); } } From 87702532d2aa24394493ccd12e77811cc2d0893c Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Fri, 31 Aug 2018 21:03:32 -0400 Subject: [PATCH 2/2] nix-build: Print stats even in failing builds --- src/nix-build/nix-build.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 54d6b1db7..94d3a2756 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -305,6 +305,8 @@ void mainWrapped(int argc, char * * argv) } } + state->printStats(); + auto buildPaths = [&](const PathSet & paths) { /* Note: we do this even when !printMissing to efficiently fetch binary cache data. */ @@ -495,7 +497,6 @@ void mainWrapped(int argc, char * * argv) for (auto & path : outPaths) std::cout << path << '\n'; - state->printStats(); } }