pub struct TelemetrySnapshot {
pub service_name: Option<String>,
pub window: Option<String>,
pub observed_at: Option<String>,
pub current_pool_size: u32,
pub workload: WorkloadConfig,
pub pool: PoolConfig,
}Expand description
Imported production telemetry for a single pool sizing decision.
Fields§
§service_name: Option<String>Optional service, application, or pool name.
window: Option<String>Optional telemetry window label, such as 15m, 1h, or 2026-05-15T10:00Z/2026-05-15T11:00Z.
observed_at: Option<String>Optional timestamp or timestamp range indicating when the snapshot was observed.
current_pool_size: u32Current production pool size to compare against the recommendation.
workload: WorkloadConfigWorkload inferred from telemetry.
pool: PoolConfigPool bounds and backend connection limits to use for recommendation.
Implementations§
Source§impl TelemetrySnapshot
impl TelemetrySnapshot
Sourcepub fn validate(&self) -> Result<(), PoolsimError>
pub fn validate(&self) -> Result<(), PoolsimError>
Validates the imported telemetry snapshot before recommendation.
§Errors
Returns PoolsimError::InvalidInput when the telemetry payload, workload,
pool constraints, or current production pool size are invalid.
Trait Implementations§
Source§impl Clone for TelemetrySnapshot
impl Clone for TelemetrySnapshot
Source§fn clone(&self) -> TelemetrySnapshot
fn clone(&self) -> TelemetrySnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TelemetrySnapshot
impl Debug for TelemetrySnapshot
Source§impl<'de> Deserialize<'de> for TelemetrySnapshot
impl<'de> Deserialize<'de> for TelemetrySnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TelemetrySnapshot
impl PartialEq for TelemetrySnapshot
Source§fn eq(&self, other: &TelemetrySnapshot) -> bool
fn eq(&self, other: &TelemetrySnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TelemetrySnapshot
impl Serialize for TelemetrySnapshot
impl StructuralPartialEq for TelemetrySnapshot
Auto Trait Implementations§
impl Freeze for TelemetrySnapshot
impl RefUnwindSafe for TelemetrySnapshot
impl Send for TelemetrySnapshot
impl Sync for TelemetrySnapshot
impl Unpin for TelemetrySnapshot
impl UnsafeUnpin for TelemetrySnapshot
impl UnwindSafe for TelemetrySnapshot
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.