feat(trigger): added working robust repartitioning trigger system

more work is needed to identify the most robust set of criteria to trigger on but the system is now very easy to exend, probe, and use.
This commit is contained in:
2025-09-29 13:35:48 -04:00
parent 4c91f8c525
commit 4f1c260444
12 changed files with 980 additions and 197 deletions

View File

@@ -0,0 +1,26 @@
#pragma once
#include "gridfire/trigger/trigger_result.h"
#include <string>
#include <unordered_map>
namespace gridfire::trigger {
template <typename TriggerContextStruct>
class Trigger {
public:
virtual ~Trigger() = default;
virtual bool check(const TriggerContextStruct& ctx) const = 0;
virtual void update(const TriggerContextStruct& ctx) = 0;
virtual void reset() = 0;
virtual std::string name() const = 0;
virtual std::string describe() const = 0;
virtual TriggerResult why(const TriggerContextStruct& ctx) const = 0;
virtual size_t numTriggers() const = 0;
virtual size_t numMisses() const = 0;
};
}