diff options
| author | Stefan Boberg <[email protected]> | 2024-12-02 12:21:53 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-12-02 12:21:53 +0100 |
| commit | e6f44577f469e891ed8dab1492a4c53224e0b765 (patch) | |
| tree | 47334606ce62fb6bf1975cdc09276ced335599f4 /src/zenstore/cache/cacherpc.cpp | |
| parent | 5.5.15-pre0 (diff) | |
| download | zen-e6f44577f469e891ed8dab1492a4c53224e0b765.tar.xz zen-e6f44577f469e891ed8dab1492a4c53224e0b765.zip | |
added support for dynamic LLM tags (#245)
* added FLLMTag which can be used to register memory tags outside of core
* changed `UE_MEMSCOPE` -> `ZEN_MEMSCOPE` for consistency
* instrumented some subsystems with dynamic tags
Diffstat (limited to 'src/zenstore/cache/cacherpc.cpp')
| -rw-r--r-- | src/zenstore/cache/cacherpc.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/zenstore/cache/cacherpc.cpp b/src/zenstore/cache/cacherpc.cpp index 2a7721fe2..54c2ff7d0 100644 --- a/src/zenstore/cache/cacherpc.cpp +++ b/src/zenstore/cache/cacherpc.cpp @@ -17,10 +17,28 @@ #include <zenutil/cache/cacherequests.h> #include <zenutil/packageformat.h> +#include <zencore/memory/llm.h> + ////////////////////////////////////////////////////////////////////////// namespace zen { +const FLLMTag& +GetCacheTag() +{ + static FLLMTag CacheTag("cache"); + + return CacheTag; +} + +const FLLMTag& +GetCacheRpcTag() +{ + static FLLMTag CacheRpcTag("rpc", GetCacheTag()); + + return CacheRpcTag; +} + using namespace std::literals; std::optional<std::string> @@ -165,6 +183,8 @@ CacheRpcHandler::HandleRpcRequest(const CacheRequestContext& Context, { ZEN_TRACE_CPU("Z$::HandleRpcRequest"); + ZEN_MEMSCOPE(GetCacheRpcTag()); + m_CacheStats.RpcRequests.fetch_add(1); CbPackage Package; |