pub struct GoldenQuery {
pub id: String,
pub query: String,
pub description: String,
pub baseline_ms: f64,
pub expected_result_count: Option<usize>,
pub tags: Vec<String>,
pub priority: u8,
pub active: bool,
pub created_at: SystemTime,
pub updated_at: SystemTime,
}Expand description
A golden query with expected performance baseline
Fields§
§id: StringUnique identifier for this query
query: StringThe SPARQL query text
description: StringDescription of what this query tests
baseline_ms: f64Baseline execution time in milliseconds
expected_result_count: Option<usize>Expected result count (optional)
Tags for categorization
priority: u8Priority (1=highest, 5=lowest)
active: boolWhether this query is active
created_at: SystemTimeCreation timestamp
updated_at: SystemTimeLast update timestamp
Implementations§
Source§impl GoldenQuery
impl GoldenQuery
Sourcepub fn new(
id: impl Into<String>,
query: impl Into<String>,
baseline_ms: f64,
) -> Self
pub fn new( id: impl Into<String>, query: impl Into<String>, baseline_ms: f64, ) -> Self
Create a new golden query with basic parameters
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set the description
Sourcepub fn with_expected_count(self, count: usize) -> Self
pub fn with_expected_count(self, count: usize) -> Self
Set expected result count
Sourcepub fn with_priority(self, priority: u8) -> Self
pub fn with_priority(self, priority: u8) -> Self
Set priority
Sourcepub fn update_baseline(&mut self, new_baseline_ms: f64)
pub fn update_baseline(&mut self, new_baseline_ms: f64)
Update the baseline
Trait Implementations§
Source§impl Clone for GoldenQuery
impl Clone for GoldenQuery
Source§fn clone(&self) -> GoldenQuery
fn clone(&self) -> GoldenQuery
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GoldenQuery
impl RefUnwindSafe for GoldenQuery
impl Send for GoldenQuery
impl Sync for GoldenQuery
impl Unpin for GoldenQuery
impl UnsafeUnpin for GoldenQuery
impl UnwindSafe for GoldenQuery
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,
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>
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
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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.