Skip to content

EntropyEngine::Core::Concurrency::GraphStatsEvent

EntropyEngine::Core::Concurrency::GraphStatsEvent

Section titled “EntropyEngine::Core::Concurrency::GraphStatsEvent”

Periodic health check - current graph statistics. More…

#include <WorkGraphEvents.h>

Inherits from EntropyEngine::Core::Concurrency::WorkGraphEvent

Name
GraphStatsEvent(const WorkGraph * g, const WorkGraphStats::Snapshot & s)
Name
WorkGraphStats::Snapshotstats
Current statistics snapshot.

Public Functions inherited from EntropyEngine::Core::Concurrency::WorkGraphEvent

Name
WorkGraphEvent(const WorkGraph * g)

Public Attributes inherited from EntropyEngine::Core::Concurrency::WorkGraphEvent

Name
std::chrono::steady_clock::time_pointtimestamp
When this event was created.
const WorkGraph *graph
Which graph emitted this event.
struct EntropyEngine::Core::Concurrency::GraphStatsEvent;

Periodic health check - current graph statistics.

Some implementations fire this periodically during execution to provide real-time monitoring without needing to poll getStats(). The frequency depends on the implementation. Useful for dashboards and progress bars.

// Real-time progress monitoring
eventBus->subscribe<GraphStatsEvent>([](const auto& event) {
const auto& stats = event.stats;
float progress = (float)(stats.completedNodes + stats.failedNodes +
stats.cancelledNodes) / stats.totalNodes * 100;
updateProgressBar(progress);
updateStatusText("Running: {}, Queued: {}, Complete: {}",
stats.executingNodes,
stats.scheduledNodes,
stats.completedNodes);
});
inline GraphStatsEvent(
const WorkGraph * g,
const WorkGraphStats::Snapshot & s
)
WorkGraphStats::Snapshot stats;

Current statistics snapshot.


Updated on 2026-01-26 at 17:14:35 -0500