about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/optimise-store.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/libstore/optimise-store.cc b/src/libstore/optimise-store.cc
index b736307b31b4..5093305a13e3 100644
--- a/src/libstore/optimise-store.cc
+++ b/src/libstore/optimise-store.cc
@@ -249,14 +249,24 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path, InodeHa
 
 void LocalStore::optimiseStore(OptimiseStats & stats)
 {
+    Activity act(*logger, actOptimiseStore);
+
     PathSet paths = queryAllValidPaths();
     InodeHash inodeHash = loadInodeHash();
 
+    act.progress(0, paths.size());
+
+    uint64_t done = 0;
+
     for (auto & i : paths) {
         addTempRoot(i);
         if (!isValidPath(i)) continue; /* path was GC'ed, probably */
-        //Activity act(*logger, lvlChatty, format("hashing files in '%1%'") % i);
-        optimisePath_(stats, realStoreDir + "/" + baseNameOf(i), inodeHash);
+        {
+            Activity act(*logger, actUnknown, fmt("optimising path '%s'", i));
+            optimisePath_(stats, realStoreDir + "/" + baseNameOf(i), inodeHash);
+        }
+        done++;
+        act.progress(done, paths.size());
     }
 }