diff options
| author | Per Larsson <[email protected]> | 2021-12-15 20:12:41 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2021-12-15 20:12:41 +0100 |
| commit | 9313768464789551f287304eadb2fb3f139cdf18 (patch) | |
| tree | 2e0da7e5ac6217b0d587b297f2827fede4379b7c /zenserver/projectstore.cpp | |
| parent | Updated readme. (diff) | |
| download | zen-9313768464789551f287304eadb2fb3f139cdf18.tar.xz zen-9313768464789551f287304eadb2fb3f139cdf18.zip | |
Added trace scopes.
Diffstat (limited to 'zenserver/projectstore.cpp')
| -rw-r--r-- | zenserver/projectstore.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/zenserver/projectstore.cpp b/zenserver/projectstore.cpp index 82dac08cd..4f9897e07 100644 --- a/zenserver/projectstore.cpp +++ b/zenserver/projectstore.cpp @@ -13,6 +13,7 @@ #include <zencore/testing.h> #include <zencore/testutils.h> #include <zencore/timer.h> +#include <zencore/trace.h> #include <zenstore/basicfile.h> #include <zenstore/cas.h> #include <zenstore/caslog.h> @@ -170,6 +171,8 @@ struct ProjectStore::OplogStorage : public RefCounted void ReplayLog(std::function<void(CbObject, const OplogEntry&)>&& Handler) { + ZEN_TRACE_CPU("ProjectStore::OplogStorage::ReplayLog"); + // This could use memory mapping or do something clever but for now it just reads the file sequentially ZEN_INFO("replaying log for '{}'", m_OplogStoragePath); @@ -241,6 +244,8 @@ struct ProjectStore::OplogStorage : public RefCounted OplogEntry AppendOp(CbObject Op) { + ZEN_TRACE_CPU("ProjectStore::OplogStorage::AppendOp"); + SharedBuffer Buffer = Op.GetBuffer(); const uint64_t WriteSize = Buffer.GetSize(); const auto OpCoreHash = uint32_t(XXH3_64bits(Buffer.GetData(), WriteSize) & 0xffffFFFF); @@ -500,6 +505,8 @@ ProjectStore::Oplog::AddMetaMapping(Oid ChunkId, IoHash Hash) uint32_t ProjectStore::Oplog::RegisterOplogEntry(CbObject Core, const OplogEntry& OpEntry, UpdateType TypeOfUpdate) { + ZEN_TRACE_CPU("ProjectStore::Oplog::RegisterOplogEntry"); + ZEN_UNUSED(TypeOfUpdate); // For now we're assuming the update is all in-memory so we can hold an exclusive lock without causing @@ -581,6 +588,8 @@ ProjectStore::Oplog::RegisterOplogEntry(CbObject Core, const OplogEntry& OpEntry uint32_t ProjectStore::Oplog::AppendNewOplogEntry(CbPackage OpPackage) { + ZEN_TRACE_CPU("ProjectStore::Oplog::AppendNewOplogEntry"); + using namespace std::literals; const CbObject& Core = OpPackage.GetObject(); |