pub struct ScanProfile {
pub scan_id: String,
pub total_duration_ms: u64,
pub phases: Vec<PhaseProfile>,
pub resources: ResourceMetrics,
}Expand description
In-memory profile composed of caller-supplied phase measurements.
Fields§
§scan_id: String§total_duration_ms: u64§phases: Vec<PhaseProfile>§resources: ResourceMetricsImplementations§
Source§impl ScanProfile
impl ScanProfile
pub fn new(scan_id: String) -> Self
pub fn add_phase(&mut self, phase: PhaseProfile)
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns whether every retained resource measurement is wire-safe.
pub fn total_requests(&self) -> u128
pub fn total_responses(&self) -> u128
pub fn total_findings(&self) -> u128
pub fn total_errors(&self) -> u128
pub fn response_request_ratio_percent(&self) -> Option<f64>
Sourcepub fn slowest_phases(&self) -> Vec<&PhaseProfile>
pub fn slowest_phases(&self) -> Vec<&PhaseProfile>
Returns every phase tied for the greatest recorded duration.
Sourcepub fn most_productive_phases(&self) -> Vec<&PhaseProfile>
pub fn most_productive_phases(&self) -> Vec<&PhaseProfile>
Returns every phase tied for the greatest recorded finding count.
Trait Implementations§
Source§impl Clone for ScanProfile
impl Clone for ScanProfile
Source§fn clone(&self) -> ScanProfile
fn clone(&self) -> ScanProfile
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 ScanProfile
impl Debug for ScanProfile
Source§impl<'de> Deserialize<'de> for ScanProfile
impl<'de> Deserialize<'de> for ScanProfile
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 ScanProfile
impl PartialEq for ScanProfile
Source§impl Serialize for ScanProfile
impl Serialize for ScanProfile
impl StructuralPartialEq for ScanProfile
Auto Trait Implementations§
impl Freeze for ScanProfile
impl RefUnwindSafe for ScanProfile
impl Send for ScanProfile
impl Sync for ScanProfile
impl Unpin for ScanProfile
impl UnsafeUnpin for ScanProfile
impl UnwindSafe for ScanProfile
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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