pub struct GraphComputeIncomplete {
pub reason: GraphComputeIncompleteReason,
pub algorithm: String,
pub elapsed_ms: u64,
pub iterations: u64,
pub work_charged: u64,
pub work_budget: u64,
}Expand description
Diagnostics describing a GraphCompute invocation that stopped early.
Returned (boxed) inside UniError::GraphComputeIncomplete when an
invocation exceeds its native-work budget, iteration cap, or wall-clock
deadline. The counters let a caller tell “too slow” apart from “did not
converge” apart from “did too much work”, and size a retry accordingly.
§Examples
use uni_common::{GraphComputeIncomplete, GraphComputeIncompleteReason};
let detail = GraphComputeIncomplete {
reason: GraphComputeIncompleteReason::Exhausted,
algorithm: "guest.ppr".into(),
elapsed_ms: 120,
iterations: 7,
work_charged: 1_000_000_000,
work_budget: 1_000_000_000,
};
assert!(detail.to_string().contains("exhausted"));Fields§
§reason: GraphComputeIncompleteReasonWhy the invocation stopped.
algorithm: StringQualified name of the algorithm being run, for the diagnostic message.
elapsed_ms: u64Wall-clock time elapsed when the invocation was cut short, in milliseconds.
iterations: u64Number of guest control-loop iterations completed before the cutoff.
work_charged: u64Native work units charged when the invocation stopped (0 if untracked).
work_budget: u64The configured native-work budget in the same units as work_charged.
Implementations§
Source§impl GraphComputeIncomplete
impl GraphComputeIncomplete
Sourcepub fn to_tagged_message(&self) -> String
pub fn to_tagged_message(&self) -> String
Serializes this diagnostic behind GRAPH_COMPUTE_INCOMPLETE_TAG.
The provider boundary returns the result as a DataFusionError message;
the query API recovers the struct with
from_tagged_message. Serialization cannot
fail for this plain-data struct, so a marshalling error degrades to the
bare tag rather than panicking.
Sourcepub fn from_tagged_message(msg: &str) -> Option<Self>
pub fn from_tagged_message(msg: &str) -> Option<Self>
Recovers a GraphComputeIncomplete from a tagged error message.
Locates GRAPH_COMPUTE_INCOMPLETE_TAG anywhere in msg (upstream
layers prepend context such as Algorithm 'x': ) and deserializes the
single JSON object that follows, ignoring any trailing text a later
error-wrapping layer may append. Returns None when the tag is absent or
the payload does not parse.
Trait Implementations§
Source§impl Clone for GraphComputeIncomplete
impl Clone for GraphComputeIncomplete
Source§fn clone(&self) -> GraphComputeIncomplete
fn clone(&self) -> GraphComputeIncomplete
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GraphComputeIncomplete
impl Debug for GraphComputeIncomplete
Source§impl<'de> Deserialize<'de> for GraphComputeIncomplete
impl<'de> Deserialize<'de> for GraphComputeIncomplete
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>,
Source§impl Display for GraphComputeIncomplete
impl Display for GraphComputeIncomplete
impl Eq for GraphComputeIncomplete
Source§impl PartialEq for GraphComputeIncomplete
impl PartialEq for GraphComputeIncomplete
Source§impl Serialize for GraphComputeIncomplete
impl Serialize for GraphComputeIncomplete
impl StructuralPartialEq for GraphComputeIncomplete
Auto Trait Implementations§
impl Freeze for GraphComputeIncomplete
impl RefUnwindSafe for GraphComputeIncomplete
impl Send for GraphComputeIncomplete
impl Sync for GraphComputeIncomplete
impl Unpin for GraphComputeIncomplete
impl UnsafeUnpin for GraphComputeIncomplete
impl UnwindSafe for GraphComputeIncomplete
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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