diff options
Diffstat (limited to 'src/zenstore/compactcas.cpp')
| -rw-r--r-- | src/zenstore/compactcas.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/zenstore/compactcas.cpp b/src/zenstore/compactcas.cpp index 0f6f011e1..a8a4dc102 100644 --- a/src/zenstore/compactcas.cpp +++ b/src/zenstore/compactcas.cpp @@ -10,6 +10,7 @@ #include <zencore/fmtutils.h> #include <zencore/logging.h> #include <zencore/scopeguard.h> +#include <zencore/trace.h> #include <zenstore/scrubcontext.h> #include <gsl/gsl-lite.hpp> @@ -234,6 +235,8 @@ CasContainerStrategy::Flush() void CasContainerStrategy::ScrubStorage(ScrubContext& Ctx) { + ZEN_TRACE_CPU("CasContainer::ScrubStorage"); + ZEN_INFO("scrubbing '{}'", m_BlocksBasePath); std::vector<IoHash> BadKeys; @@ -373,6 +376,8 @@ CasContainerStrategy::ScrubStorage(ScrubContext& Ctx) void CasContainerStrategy::CollectGarbage(GcContext& GcCtx) { + ZEN_TRACE_CPU("CasContainer::CollectGarbage"); + // It collects all the blocks that we want to delete chunks from. For each such // block we keep a list of chunks to retain and a list of chunks to delete. // @@ -513,6 +518,8 @@ CasContainerStrategy::StorageSize() const void CasContainerStrategy::MakeIndexSnapshot() { + ZEN_TRACE_CPU("CasContainer::MakeIndexSnapshot"); + uint64_t LogCount = m_CasLog.GetLogCount(); if (m_LogFlushPosition == LogCount) { @@ -598,6 +605,8 @@ CasContainerStrategy::MakeIndexSnapshot() uint64_t CasContainerStrategy::ReadIndexFile(const std::filesystem::path& IndexPath, uint32_t& OutVersion) { + ZEN_TRACE_CPU("CasContainer::ReadIndexFile"); + std::vector<CasDiskIndexEntry> Entries; Stopwatch Timer; const auto _ = MakeGuard([&] { @@ -645,6 +654,8 @@ CasContainerStrategy::ReadIndexFile(const std::filesystem::path& IndexPath, uint uint64_t CasContainerStrategy::ReadLog(const std::filesystem::path& LogPath, uint64_t SkipEntryCount) { + ZEN_TRACE_CPU("CasContainer::ReadLog"); + if (!TCasLogFile<CasDiskIndexEntry>::IsValid(LogPath)) { ZEN_WARN("removing invalid cas log at '{}'", LogPath); @@ -697,6 +708,8 @@ CasContainerStrategy::ReadLog(const std::filesystem::path& LogPath, uint64_t Ski void CasContainerStrategy::OpenContainer(bool IsNewStore) { + ZEN_TRACE_CPU("CasContainer::OpenContainer"); + // Add .running file and delete on clean on close to detect bad termination m_LocationMap.clear(); |