pub enum RecoveryEstimate {
Immediate,
NotRecoverable,
UnknownStateSize {
hint: &'static str,
},
Hydrate {
state_mb: u32,
seconds: f64,
basis: String,
},
Measured {
seconds: f64,
bytes: u64,
measured_at: DateTime<Utc>,
age_days: i64,
node: String,
basis: String,
},
}Expand description
How long it takes to get the state back, and on what basis that is claimed.
Hydrate is an extrapolation from two measured
constants (MEASURED_HYDRATE_MB_PER_S, MEASURED_GET_RTT_MS) applied
to a declared state size — one measurement, on one host, against one
backend, stretched over a number an operator typed. That is stated on the
type rather than in a footnote because a recovery-time number without its
provenance is the single easiest thing in a planning report to mistake for a
measurement.
Measured (R850-T2) is the exception and the thing to
prefer: a restore that was actually timed, by
turso-backup-hydrate, replayed out of .yah/cloud/recovery.jsonl by
CloudConfig::load into CloudConfig::recovery_measurements. It carries
its own provenance and its age, for the same reason — and it is never
discarded for being old. A real restore from six weeks ago is a better
answer than an extrapolation from an unrelated host; it is reported with
“measured N days ago” attached so the reader can discount it themselves.
Variants§
Immediate
Nothing to hydrate — the workload carries no durable state.
NotRecoverable
There is no copy to recover from. Recovery is not a duration.
UnknownStateSize
A copy exists but the spec does not say how big the state is, so the transfer cannot be estimated. Names the annotation that would fix it.
Hydrate
Bulk transfer of a declared state size at the measured throughput.
Fields
Measured
A real restore of this workload, timed on a real host. Summed over the workload’s subjects, because the helper restores them one at a time and a workload’s recovery is all of them.
Fields
bytes: u64Summed bytes on disk after the restore. Not a declaration — this is what actually landed.
measured_at: DateTime<Utc>When the oldest component of the sum was measured. A sum is only as fresh as its stalest part.
age_days: i64Whole days from measured_at to when the journal was replayed.
Carried into JSON beside basis so a consumer can strip neither the
provenance nor the age.
Implementations§
Trait Implementations§
Source§impl Clone for RecoveryEstimate
impl Clone for RecoveryEstimate
Source§impl Debug for RecoveryEstimate
impl Debug for RecoveryEstimate
Source§impl PartialEq for RecoveryEstimate
impl PartialEq for RecoveryEstimate
Source§impl Serialize for RecoveryEstimate
impl Serialize for RecoveryEstimate
impl StructuralPartialEq for RecoveryEstimate
Auto Trait Implementations§
impl Freeze for RecoveryEstimate
impl RefUnwindSafe for RecoveryEstimate
impl Send for RecoveryEstimate
impl Sync for RecoveryEstimate
impl Unpin for RecoveryEstimate
impl UnsafeUnpin for RecoveryEstimate
impl UnwindSafe for RecoveryEstimate
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.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>, which can then be
downcast into Box<dyn 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>, which 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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more