aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-03-31 13:53:01 +0200
committerGitHub Enterprise <[email protected]>2025-03-31 13:53:01 +0200
commit2103b5d1f20f1b46a30eced4130c22a7cf7ae694 (patch)
treef4e24d04cae4bfbf732acb3038540817d3255701 /src
parent5.6.1-pre2 (diff)
downloadzen-2103b5d1f20f1b46a30eced4130c22a7cf7ae694.tar.xz
zen-2103b5d1f20f1b46a30eced4130c22a7cf7ae694.zip
logging improvement (#332)
* Cache -> Download cache * cleaned up info regarding local cache/state and remote cache
Diffstat (limited to 'src')
-rw-r--r--src/zen/cmds/builds_cmd.cpp37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/zen/cmds/builds_cmd.cpp b/src/zen/cmds/builds_cmd.cpp
index 2bbb21012..eebb6d82b 100644
--- a/src/zen/cmds/builds_cmd.cpp
+++ b/src/zen/cmds/builds_cmd.cpp
@@ -5235,21 +5235,24 @@ namespace {
}
}
- if (!CachedSequenceHashesFound.empty() || !CachedChunkHashesFound.empty() || !CachedBlocksFound.empty() ||
- !LocalPathIndexesMatchingSequenceIndexes.empty() || CacheMappingStats.LocalChunkMatchingRemoteCount > 0)
- {
- ZEN_CONSOLE(
- "Cache: {} ({}) chunk sequences, {} ({}) chunks, {} ({}) blocks. Local state: {} ({}) chunk sequences, {} ({}) chunks",
- CachedSequenceHashesFound.size(),
- NiceBytes(CacheMappingStats.CacheSequenceHashesByteCount),
- CachedChunkHashesFound.size(),
- NiceBytes(CacheMappingStats.CacheChunkByteCount),
- CachedBlocksFound.size(),
- NiceBytes(CacheMappingStats.CacheBlocksByteCount),
- LocalPathIndexesMatchingSequenceIndexes.size(),
- NiceBytes(CacheMappingStats.LocalPathsMatchingSequencesByteCount),
- CacheMappingStats.LocalChunkMatchingRemoteCount,
- NiceBytes(CacheMappingStats.LocalChunkMatchingRemoteByteCount));
+ if (!CachedSequenceHashesFound.empty() || !CachedChunkHashesFound.empty() || !CachedBlocksFound.empty())
+ {
+ ZEN_CONSOLE("Download cache: Found {} ({}) chunk sequences, {} ({}) chunks, {} ({}) blocks.",
+ CachedSequenceHashesFound.size(),
+ NiceBytes(CacheMappingStats.CacheSequenceHashesByteCount),
+ CachedChunkHashesFound.size(),
+ NiceBytes(CacheMappingStats.CacheChunkByteCount),
+ CachedBlocksFound.size(),
+ NiceBytes(CacheMappingStats.CacheBlocksByteCount));
+ }
+
+ if (!LocalPathIndexesMatchingSequenceIndexes.empty() || CacheMappingStats.LocalChunkMatchingRemoteCount > 0)
+ {
+ ZEN_CONSOLE("Local state : Found {} ({}) chunk sequences, {} ({}) chunks",
+ LocalPathIndexesMatchingSequenceIndexes.size(),
+ NiceBytes(CacheMappingStats.LocalPathsMatchingSequencesByteCount),
+ CacheMappingStats.LocalChunkMatchingRemoteCount,
+ NiceBytes(CacheMappingStats.LocalChunkMatchingRemoteByteCount));
}
uint64_t BytesToWrite = 0;
@@ -5633,7 +5636,7 @@ namespace {
ExistsResult.ElapsedTimeMs = Timer.GetElapsedTimeMs();
if (!ExistsResult.ExistingBlobs.empty())
{
- ZEN_CONSOLE("Found {} out of {} needed blobs in remote cache in {}",
+ ZEN_CONSOLE("Remote cache : Found {} out of {} needed blobs in {}",
ExistsResult.ExistingBlobs.size(),
BlobHashes.size(),
NiceTimeSpanMs(ExistsResult.ElapsedTimeMs));
@@ -8737,7 +8740,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
}
ZEN_CONSOLE("Remote: {}.{}",
StorageDescription,
- CacheDescription.empty() ? std::string("") : fmt::format(" Cache: {}", CacheDescription));
+ CacheDescription.empty() ? std::string("") : fmt::format(" Remote Cache: {}", CacheDescription));
return Result;
};