mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
Progress indicator: Show number of active items
This commit is contained in:
parent
0e0dcf2c7e
commit
bf1f123b09
7 changed files with 39 additions and 28 deletions
|
@ -625,9 +625,10 @@ void copyPaths(ref<Store> srcStore, ref<Store> dstStore, const PathSet & storePa
|
|||
|
||||
std::atomic<size_t> nrDone{0};
|
||||
std::atomic<uint64_t> bytesExpected{0};
|
||||
std::atomic<uint64_t> nrRunning{0};
|
||||
|
||||
auto showProgress = [&]() {
|
||||
act.progress(nrDone, missing.size());
|
||||
act.progress(nrDone, missing.size(), nrRunning);
|
||||
};
|
||||
|
||||
ThreadPool pool;
|
||||
|
@ -655,6 +656,8 @@ void copyPaths(ref<Store> srcStore, ref<Store> dstStore, const PathSet & storePa
|
|||
|
||||
if (!dstStore->isValidPath(storePath)) {
|
||||
printInfo("copying '%s'...", storePath);
|
||||
MaintainCount<decltype(nrRunning)> mc(nrRunning);
|
||||
showProgress();
|
||||
copyStorePath(srcStore, dstStore, storePath, repair, checkSigs);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue