diff options
| author | Stefan Boberg <[email protected]> | 2026-04-02 22:52:53 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2026-04-02 22:52:53 +0200 |
| commit | 1f766abf8fce4bf24d600bc5cb3c3c396f8a29ca (patch) | |
| tree | b3b60be4789caaed07903c07ca7a5107fe49029f /src/zencompute/runners/remotehttprunner.cpp | |
| parent | Add MemoryCidStore: memory-backed chunk store with async write-through (diff) | |
| parent | Add hostname and payload stats to remote submit warnings (diff) | |
| download | zen-sb/compute-oidc-auth.tar.xz zen-sb/compute-oidc-auth.zip | |
Merge branch 'sb/compute-oidc-auth' of https://github.ol.epicgames.net/ue-foundation/zen into sb/compute-oidc-authsb/compute-oidc-auth
Diffstat (limited to 'src/zencompute/runners/remotehttprunner.cpp')
| -rw-r--r-- | src/zencompute/runners/remotehttprunner.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/zencompute/runners/remotehttprunner.cpp b/src/zencompute/runners/remotehttprunner.cpp index 1039969b4..55f78fdd6 100644 --- a/src/zencompute/runners/remotehttprunner.cpp +++ b/src/zencompute/runners/remotehttprunner.cpp @@ -39,6 +39,7 @@ RemoteHttpRunner::RemoteHttpRunner(ChunkResolver& InChunkResolver, , m_ChunkResolver{InChunkResolver} , m_WorkerPool{InWorkerPool} , m_HostName{HostName} +, m_DisplayName{HostName} , m_BaseUrl{fmt::format("{}/compute", HostName)} , m_Http(m_BaseUrl) , m_InstanceId(Oid::NewOid()) @@ -60,6 +61,15 @@ RemoteHttpRunner::RemoteHttpRunner(ChunkResolver& InChunkResolver, m_MonitorThread = std::thread{&RemoteHttpRunner::MonitorThreadFunction, this}; } +void +RemoteHttpRunner::SetRemoteHostname(std::string_view Hostname) +{ + if (!Hostname.empty()) + { + m_DisplayName = fmt::format("{} ({})", m_HostName, Hostname); + } +} + RemoteHttpRunner::~RemoteHttpRunner() { Shutdown(); @@ -394,6 +404,8 @@ RemoteHttpRunner::SubmitAction(Ref<RunnerAction> Action) CompressedBuffer::FromCompressed(SharedBuffer{Chunk}, /* out */ DataRawHash, /* out */ DataRawSize); Pkg.AddAttachment(CbAttachment(Compressed, AttachHash)); + m_LastSubmitStats.TotalAttachments.fetch_add(1, std::memory_order_relaxed); + m_LastSubmitStats.TotalAttachmentBytes.fetch_add(Chunk.GetSize(), std::memory_order_relaxed); } }); @@ -460,6 +472,8 @@ RemoteHttpRunner::SubmitAction(Ref<RunnerAction> Action) ZEN_ASSERT(DataRawHash == NeedHash); Pkg.AddAttachment(CbAttachment(Compressed, NeedHash)); + m_LastSubmitStats.TotalAttachments.fetch_add(1, std::memory_order_relaxed); + m_LastSubmitStats.TotalAttachmentBytes.fetch_add(Chunk.GetSize(), std::memory_order_relaxed); } else { @@ -583,6 +597,8 @@ RemoteHttpRunner::SubmitActionBatch(const std::string& SubmitUrl, const std::vec CompressedBuffer::FromCompressed(SharedBuffer{Chunk}, /* out */ DataRawHash, /* out */ DataRawSize); Pkg.AddAttachment(CbAttachment(Compressed, AttachHash)); + m_LastSubmitStats.TotalAttachments.fetch_add(1, std::memory_order_relaxed); + m_LastSubmitStats.TotalAttachmentBytes.fetch_add(Chunk.GetSize(), std::memory_order_relaxed); } } @@ -623,6 +639,8 @@ RemoteHttpRunner::SubmitActionBatch(const std::string& SubmitUrl, const std::vec ZEN_ASSERT(DataRawHash == NeedHash); Pkg.AddAttachment(CbAttachment(Compressed, NeedHash)); + m_LastSubmitStats.TotalAttachments.fetch_add(1, std::memory_order_relaxed); + m_LastSubmitStats.TotalAttachmentBytes.fetch_add(Chunk.GetSize(), std::memory_order_relaxed); } else { |