The values a fire when: condition is evaluated against.
You never build one of these yourself — Kepler.Poller assembles one per
watch per tick and hands it to the function compiled from your condition.
What matters is which names the condition can use, and what they mean.
Names available in a condition
| Name | Meaning |
|---|---|
value | This watch's measurement for the current tick. |
prev | The previous tick's measurement. |
delta | value - prev. |
rate | delta per second — change, not throughput. |
For counting aggregates (measure :count) value is the number of events in
the tick window, and measure :rate gives you throughput directly, so rate
keeps its single meaning of "how fast is this number moving" everywhere.
Referring to other watches
| Call | Reads | Timing |
|---|---|---|
watch(:name) | that watch's value | this tick |
met?(:name) or bare name | whether its condition held | this tick |
firing?(:name) | whether it is in the firing state | as of the previous tick |
All measurements are sampled before any condition runs, and conditions run in
dependency order, so watch/1 and met?/1 always see current-tick data
regardless of declaration order. firing?/1 deliberately reads the previous
tick's outcome: firing state is the output of debouncing, and letting a
condition depend on this tick's output would be circular.
A cycle among met?/1 references is a compile error.
Summary
Functions
Whether another watch was in the firing state as of the previous tick.
Whether another watch's condition held on this tick, before debouncing.
The current-tick measurement of another watch.
Types
Functions
Whether another watch was in the firing state as of the previous tick.
Compiled from firing?(:name). Unlike met?/2 this reflects the debounced
outcome — it stays true through a cooldown: window and only becomes true
after a sustained: window has elapsed.
Whether another watch's condition held on this tick, before debouncing.
Compiled from met?(:name) or from a bare reference to a declared watch.
The current-tick measurement of another watch.
Compiled from watch(:name) in a condition. Raises if the watch produced no
data, which cannot happen in practice: the poller skips any watch whose
dependencies are missing for the tick.