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/functionrunner.h | |
| 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/functionrunner.h')
| -rw-r--r-- | src/zencompute/runners/functionrunner.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/zencompute/runners/functionrunner.h b/src/zencompute/runners/functionrunner.h index a8234237c..449f0e228 100644 --- a/src/zencompute/runners/functionrunner.h +++ b/src/zencompute/runners/functionrunner.h @@ -43,6 +43,21 @@ public: [[nodiscard]] virtual std::vector<SubmitResult> SubmitActions(const std::vector<Ref<RunnerAction>>& Actions); [[nodiscard]] virtual std::string_view GetDisplayName() const { return "local"; } + // Accumulated stats from the most recent SubmitActions call. + // Reset before each call, populated by the runner implementation. + struct SubmitStats + { + std::atomic<size_t> TotalAttachments{0}; + std::atomic<uint64_t> TotalAttachmentBytes{0}; + + void Reset() + { + TotalAttachments.store(0, std::memory_order_relaxed); + TotalAttachmentBytes.store(0, std::memory_order_relaxed); + } + }; + SubmitStats m_LastSubmitStats; + // Best-effort cancellation of a specific in-flight action. Returns true if the // cancellation signal was successfully sent. The action will transition to Cancelled // asynchronously once the platform-level termination completes. |