diff options
| author | Stefan Boberg <[email protected]> | 2025-03-06 17:27:59 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2025-03-06 17:27:59 +0100 |
| commit | 66e5d1f4e288e0c32f854ebe3b63584b42b83554 (patch) | |
| tree | d67e9d358419b5baccd429d54988414e0d7cd7a6 /src/zenserver/upstream | |
| parent | reduced memory churn using fixed_xxx containers (#236) (diff) | |
| download | zen-66e5d1f4e288e0c32f854ebe3b63584b42b83554.tar.xz zen-66e5d1f4e288e0c32f854ebe3b63584b42b83554.zip | |
switched std::vector -> eastl::vector
Diffstat (limited to 'src/zenserver/upstream')
| -rw-r--r-- | src/zenserver/upstream/upstreamcache.cpp | 52 | ||||
| -rw-r--r-- | src/zenserver/upstream/upstreamcache.h | 2 |
2 files changed, 27 insertions, 27 deletions
diff --git a/src/zenserver/upstream/upstreamcache.cpp b/src/zenserver/upstream/upstreamcache.cpp index e438a840a..5ddc141d4 100644 --- a/src/zenserver/upstream/upstreamcache.cpp +++ b/src/zenserver/upstream/upstreamcache.cpp @@ -1461,7 +1461,7 @@ namespace detail { UpstreamEndpointInfo m_Info; UpstreamStatus m_Status; UpstreamEndpointStats m_Stats; - std::vector<ZenEndpoint> m_Endpoints; + eastl::vector<ZenEndpoint> m_Endpoints; std::chrono::milliseconds m_ConnectTimeout; std::chrono::milliseconds m_Timeout; RwLock m_ClientLock; @@ -1594,7 +1594,7 @@ public: std::shared_lock<std::shared_mutex> _(m_EndpointsMutex); - std::vector<CacheKeyRequest*> RemainingKeys(Requests.begin(), Requests.end()); + eastl::vector<CacheKeyRequest*> RemainingKeys(Requests.begin(), Requests.end()); if (m_Options.ReadUpstream) { @@ -1610,9 +1610,9 @@ public: continue; } - UpstreamEndpointStats& Stats = Endpoint->Stats(); - std::vector<CacheKeyRequest*> Missing; - GetUpstreamCacheResult Result; + UpstreamEndpointStats& Stats = Endpoint->Stats(); + eastl::vector<CacheKeyRequest*> Missing; + GetUpstreamCacheResult Result; { metrics::OperationTiming::Scope Scope(Stats.CacheGetRequestTiming); @@ -1662,7 +1662,7 @@ public: std::shared_lock<std::shared_mutex> _(m_EndpointsMutex); - std::vector<CacheChunkRequest*> RemainingKeys(CacheChunkRequests.begin(), CacheChunkRequests.end()); + eastl::vector<CacheChunkRequest*> RemainingKeys(CacheChunkRequests.begin(), CacheChunkRequests.end()); if (m_Options.ReadUpstream) { @@ -1678,9 +1678,9 @@ public: continue; } - UpstreamEndpointStats& Stats = Endpoint->Stats(); - std::vector<CacheChunkRequest*> Missing; - GetUpstreamCacheResult Result; + UpstreamEndpointStats& Stats = Endpoint->Stats(); + eastl::vector<CacheChunkRequest*> Missing; + GetUpstreamCacheResult Result; { metrics::OperationTiming::Scope Scope(Endpoint->Stats().CacheGetRequestTiming); @@ -1775,7 +1775,7 @@ public: std::shared_lock<std::shared_mutex> _(m_EndpointsMutex); - std::vector<CacheValueRequest*> RemainingKeys(CacheValueRequests.begin(), CacheValueRequests.end()); + eastl::vector<CacheValueRequest*> RemainingKeys(CacheValueRequests.begin(), CacheValueRequests.end()); if (m_Options.ReadUpstream) { @@ -1791,9 +1791,9 @@ public: continue; } - UpstreamEndpointStats& Stats = Endpoint->Stats(); - std::vector<CacheValueRequest*> Missing; - GetUpstreamCacheResult Result; + UpstreamEndpointStats& Stats = Endpoint->Stats(); + eastl::vector<CacheValueRequest*> Missing; + GetUpstreamCacheResult Result; { metrics::OperationTiming::Scope Scope(Endpoint->Stats().CacheGetRequestTiming); @@ -1903,8 +1903,8 @@ private: { ZEN_TRACE_CPU("Upstream::ProcessCacheRecord"); - ZenCacheValue CacheValue; - std::vector<IoBuffer> Payloads; + ZenCacheValue CacheValue; + eastl::vector<IoBuffer> Payloads; if (!m_CacheStore.Get(CacheRecord.Context, CacheRecord.Namespace, CacheRecord.Key.Bucket, CacheRecord.Key.Hash, CacheValue)) { @@ -2009,7 +2009,7 @@ private: try { - std::vector<UpstreamEndpoint*> Endpoints; + eastl::vector<UpstreamEndpoint*> Endpoints; { std::shared_lock<std::shared_mutex> _(m_EndpointsMutex); @@ -2098,16 +2098,16 @@ private: } }; - LoggerRef m_Log; - UpstreamCacheOptions m_Options; - ZenCacheStore& m_CacheStore; - CidStore& m_CidStore; - UpstreamQueue m_UpstreamQueue; - std::shared_mutex m_EndpointsMutex; - std::vector<std::unique_ptr<UpstreamEndpoint>> m_Endpoints; - std::vector<std::thread> m_UpstreamThreads; - std::thread m_EndpointMonitorThread; - RunState m_RunState; + LoggerRef m_Log; + UpstreamCacheOptions m_Options; + ZenCacheStore& m_CacheStore; + CidStore& m_CidStore; + UpstreamQueue m_UpstreamQueue; + std::shared_mutex m_EndpointsMutex; + eastl::vector<std::unique_ptr<UpstreamEndpoint>> m_Endpoints; + eastl::vector<std::thread> m_UpstreamThreads; + std::thread m_EndpointMonitorThread; + RunState m_RunState; }; ////////////////////////////////////////////////////////////////////////// diff --git a/src/zenserver/upstream/upstreamcache.h b/src/zenserver/upstream/upstreamcache.h index 26e5decac..219f2474e 100644 --- a/src/zenserver/upstream/upstreamcache.h +++ b/src/zenserver/upstream/upstreamcache.h @@ -11,11 +11,11 @@ #include <zenstore/cache/upstreamcacheclient.h> #include <zenutil/cache/cache.h> +#include <EASTL/vector.h> #include <atomic> #include <chrono> #include <functional> #include <memory> -#include <vector> namespace zen { |