Example #1
0
 explicit SeniorityStrategy(const SerenityConfig& _config)
     : RevocationStrategy(Tag(QOS_CONTROLLER, "SeniorityStrategy")),
       cooldownCounter(None()),
       estimatorDisabled(false) {
   SerenityConfig config = SeniorityConfig(_config);
   this->cfgCooldownTime = config.getU64(decider::CONTENTION_COOLDOWN);
   this->cfgDefaultSeverity = config.getD(decider::STARTING_SEVERITY);
 }
Example #2
0
 explicit CpuContentionStrategy(
     const SerenityConfig& _config,
     const lambda::function<usage::GetterFunction>& _cpuUsageGetFunction)
     : RevocationStrategy(Tag(QOS_CONTROLLER, "CpuContentionStrategy")),
       cpuUsageGetFunction(_cpuUsageGetFunction),
       cooldownCounter(None()),
       estimatorDisabled(false) {
   SerenityConfig config = CpuContentionStrategyConfig(_config);
   this->cfgCooldownTime = config.getU64(strategy::CONTENTION_COOLDOWN);
   this->cfgDefaultSeverity = config.getD(strategy::DEFAULT_CPU_SEVERITY);
 }