class
Mosquito::ThresholdGate
- Mosquito::ThresholdGate
- Mosquito::ResourceGate
- Reference
- Object
Overview
A gate that samples a metric via a callback and compares it against a threshold.
Example
gate = Mosquito::ThresholdGate.new(
threshold: 85.0,
sample_ttl: 2.seconds
) { `nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits`.strip.to_f }