aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2026-02-20 10:31:31 +0100
committerGitHub Enterprise <[email protected]>2026-02-20 10:31:31 +0100
commit80bc5a53fe9077bc20d287b912f6476db233110c (patch)
tree6e32fc6818949faf06d1f00c394b8a40e17714ef
parentfix plain progress bar (#768) (diff)
downloadzen-80bc5a53fe9077bc20d287b912f6476db233110c.tar.xz
zen-80bc5a53fe9077bc20d287b912f6476db233110c.zip
fix builds download indexing timer (#769)
* fix build download indexing timer log
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/zen/cmds/builds_cmd.cpp7
-rw-r--r--src/zenremotestore/builds/buildstorageoperations.cpp7
3 files changed, 8 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0098f08b4..af2414682 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
##
- Bugfix: `--plain-progress` style progress bar should now show elapsed time correctly
+- Bugfix: Time spent indexing local and remote state during `zen builds download` now show the correct time
## 5.7.21
- Feature: Added `--security-config-path` option to zenserver to configure security settings
diff --git a/src/zen/cmds/builds_cmd.cpp b/src/zen/cmds/builds_cmd.cpp
index 8dfe1093f..849259013 100644
--- a/src/zen/cmds/builds_cmd.cpp
+++ b/src/zen/cmds/builds_cmd.cpp
@@ -1467,9 +1467,16 @@ namespace {
ZEN_CONSOLE("Downloading build {}, parts:{} to '{}' ({})", BuildId, BuildPartString.ToView(), Path, NiceBytes(RawSize));
}
+ Stopwatch IndexTimer;
+
const ChunkedContentLookup LocalLookup = BuildChunkedContentLookup(LocalState.State.ChunkedContent);
const ChunkedContentLookup RemoteLookup = BuildChunkedContentLookup(RemoteContent);
+ if (!IsQuiet)
+ {
+ ZEN_OPERATION_LOG_INFO(Output, "Indexed local and remote content in {}", NiceTimeSpanMs(IndexTimer.GetElapsedTimeMs()));
+ }
+
ProgressBar::SetLogOperationProgress(ProgressMode, TaskSteps::Download, TaskSteps::StepCount);
BuildsOperationUpdateFolder Updater(
diff --git a/src/zenremotestore/builds/buildstorageoperations.cpp b/src/zenremotestore/builds/buildstorageoperations.cpp
index ade431393..72e06767a 100644
--- a/src/zenremotestore/builds/buildstorageoperations.cpp
+++ b/src/zenremotestore/builds/buildstorageoperations.cpp
@@ -579,13 +579,6 @@ BuildsOperationUpdateFolder::Execute(FolderContent& OutLocalFolderState)
CreateDirectories(m_TempDownloadFolderPath);
CreateDirectories(m_TempBlockFolderPath);
- Stopwatch IndexTimer;
-
- if (!m_Options.IsQuiet)
- {
- ZEN_OPERATION_LOG_INFO(m_LogOutput, "Indexed local and remote content in {}", NiceTimeSpanMs(IndexTimer.GetElapsedTimeMs()));
- }
-
Stopwatch CacheMappingTimer;
std::vector<std::atomic<uint32_t>> SequenceIndexChunksLeftToWriteCounters(m_RemoteContent.ChunkedContent.SequenceRawHashes.size());