pub enum PeriodEnd {
Show 19 variants
NothingCached,
UncachedInput {
input: u64,
prefix: u64,
},
BoundReached {
ledger_usd: f64,
bound_usd: f64,
},
PingTooExpensive {
worst_usd: f64,
bound_usd: f64,
},
HoursReached(u32),
Expired {
age_secs: u64,
},
PrefixChanged,
ContextRollover(String),
CacheMiss {
written: u64,
},
PartialMiss {
written: u64,
prefix: u64,
},
Rejected(String),
TransientExhausted(String),
CostCap {
cap: f64,
},
TurnStarted,
Compaction,
Disabled,
ParkedByRequest,
SessionEnding,
Blocked(&'static str),
}Expand description
Why a period ended (or never started). Logged once, shown by
/keepwarm status.
Variants§
NothingCached
The last request (or a ping) cached nothing: the prefix is below the model’s cache minimum, or caching is off for it.
UncachedInput
A ping paid for a large uncached share of the prefix.
BoundReached
Ski-rental bound: the next worst-case ping would push the ledger past the rewrite it prevents.
PingTooExpensive
Not even one worst-case ping fits the bound (budgeted thinking on a small prefix).
HoursReached(u32)
<N>h window elapsed.
Expired
The cache is (nearly) expired: the machine slept, or the session went idle too late. A ping now would be a full write.
PrefixChanged
The next turn’s prefix is no longer what is cached.
ContextRollover(String)
The next turn would roll the context over / hard-stop before its first request: what is cached is not what it sends.
CacheMiss
A ping wrote the prefix instead of reading it.
PartialMiss
A ping rewrote a large share of the prefix (partial miss).
Rejected(String)
4xx / auth / configuration: never retried.
TransientExhausted(String)
Transient errors outlasted the backoff (or the TTL).
CostCap
max_session_cost reached (or the next ping would cross it if it
missed the cache and rewrote the whole prefix).
TurnStarted
Compaction
Disabled
/keepwarm off.
ParkedByRequest
An explicit park request (not the idle auto-park, which waits).
SessionEnding
Blocked(&'static str)
Something else owns the session (driver, queued work, prompt).
Trait Implementations§
impl StructuralPartialEq for PeriodEnd
Auto Trait Implementations§
impl Freeze for PeriodEnd
impl RefUnwindSafe for PeriodEnd
impl Send for PeriodEnd
impl Sync for PeriodEnd
impl Unpin for PeriodEnd
impl UnsafeUnpin for PeriodEnd
impl UnwindSafe for PeriodEnd
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.