aboutsummaryrefslogtreecommitdiff
path: root/src/zencompute/runners/functionrunner.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/zencompute/runners/functionrunner.h')
-rw-r--r--src/zencompute/runners/functionrunner.h15
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.