pub struct GraphBuilderConfig {
pub clone_config: CloneConfig,
}Expand description
Configuration for the relation graph builder.
This struct controls the behavior of the relation inference pipeline, allowing fine-tuning of detection thresholds and parameters.
§Example
ⓘ
use memscope_rs::analysis::relation_inference::{
GraphBuilderConfig, CloneConfig,
};
// Default configuration
let config = GraphBuilderConfig::default();
// Custom configuration for stricter clone detection
let config = GraphBuilderConfig {
clone_config: CloneConfig {
min_similarity: 0.95, // Require 95% content match
max_time_diff_ns: 5_000_000, // 5ms window
..Default::default()
},
};
let graph = RelationGraphBuilder::build(&allocations, Some(config));§Fields
clone_config- Controls clone detection behavior. SeeCloneConfigfor details on similarity thresholds and time windows.
Fields§
§clone_config: CloneConfigConfiguration for clone detection.
Controls how the system identifies cloned allocations based on:
- Content similarity ratio (
min_similarity) - Maximum time difference between allocations (
max_time_diff_ns) - Number of bytes to compare (
compare_bytes)
Default values are tuned for typical Rust workloads:
- 80% similarity threshold
- 10ms time window
- 64 bytes comparison
Trait Implementations§
Source§impl Clone for GraphBuilderConfig
impl Clone for GraphBuilderConfig
Source§fn clone(&self) -> GraphBuilderConfig
fn clone(&self) -> GraphBuilderConfig
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 moreSource§impl Debug for GraphBuilderConfig
impl Debug for GraphBuilderConfig
Source§impl Default for GraphBuilderConfig
impl Default for GraphBuilderConfig
Source§fn default() -> GraphBuilderConfig
fn default() -> GraphBuilderConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GraphBuilderConfig
impl RefUnwindSafe for GraphBuilderConfig
impl Send for GraphBuilderConfig
impl Sync for GraphBuilderConfig
impl Unpin for GraphBuilderConfig
impl UnsafeUnpin for GraphBuilderConfig
impl UnwindSafe for GraphBuilderConfig
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 more