pub struct SearchResults<I, T> { /* private fields */ }Expand description
Aggregated results for a single invocation of search. This corresponds to a
potentially parallelized batch of queries.
§Note
In the documentation of the member functions, the term “querywise” describes that the returned collection has an ordered correspondence with the original queries.
If the Search object that generated these results as N queries (as returned by
Search::num_queries), then for these returned container, entry i will correspond
to the ith query for i in 0..N.
Implementations§
Source§impl<I, T> SearchResults<I, T>
impl<I, T> SearchResults<I, T>
Sourcepub fn end_to_end_latency(&self) -> MicroSeconds
pub fn end_to_end_latency(&self) -> MicroSeconds
Return the wall clock time taken to process all queries in the batch.
Sourcepub fn latencies(&self) -> &[MicroSeconds]
pub fn latencies(&self) -> &[MicroSeconds]
Return the querywise latencies for each search. If Self::latencies_mut has been
called, the return slice loses its querywise guarantee.
Sourcepub fn latencies_mut(&mut self) -> &mut [MicroSeconds]
pub fn latencies_mut(&mut self) -> &mut [MicroSeconds]
Return the querywise latencies for each search by mutable reference. This is for
efficient use of diskann_benchmark_runner::utils::percentiles::compute_percentiles.
Modifying the underlying slice invalidates the querywise guarantee.
Sourcepub fn take_output(self) -> Vec<T>
pub fn take_output(self) -> Vec<T>
Consume self, returning the querywise customized outputs from search by value.
Trait Implementations§
Auto Trait Implementations§
impl<I, T> Freeze for SearchResults<I, T>
impl<I, T> RefUnwindSafe for SearchResults<I, T>where
T: RefUnwindSafe,
I: RefUnwindSafe,
impl<I, T> Send for SearchResults<I, T>
impl<I, T> Sync for SearchResults<I, T>
impl<I, T> Unpin for SearchResults<I, T>
impl<I, T> UnsafeUnpin for SearchResults<I, T>
impl<I, T> UnwindSafe for SearchResults<I, T>where
T: UnwindSafe,
I: UnwindSafe,
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> DispatchRule<T> for T
impl<T> DispatchRule<T> for T
Source§type Error = Infallible
type Error = Infallible
convert.Source§fn try_match(_from: &T) -> Result<MatchScore, FailureScore>
fn try_match(_from: &T) -> Result<MatchScore, FailureScore>
Source§fn convert(from: T) -> Result<T, <T as DispatchRule<T>>::Error>
fn convert(from: T) -> Result<T, <T as DispatchRule<T>>::Error>
Source§fn description(f: &mut Formatter<'_>, from: Option<&T>) -> Result<(), Error>
fn description(f: &mut Formatter<'_>, from: Option<&T>) -> Result<(), Error>
Source§fn try_match_verbose<'a>(
from: &'a From,
) -> Result<MatchScore, TaggedFailureScore<'a>>where
Self: 'a,
fn try_match_verbose<'a>(
from: &'a From,
) -> Result<MatchScore, TaggedFailureScore<'a>>where
Self: 'a,
try_match but returns a reason for a failed score. Read more