pub struct SystemOptimizer { /* private fields */ }
Expand description
系统优化器
Implementations§
Source§impl SystemOptimizer
impl SystemOptimizer
Sourcepub fn new() -> TrackingResult<Self>
pub fn new() -> TrackingResult<Self>
Create new system optimizer
Sourcepub fn detect_system_resources() -> TrackingResult<SystemResources>
pub fn detect_system_resources() -> TrackingResult<SystemResources>
Detect system resources
Sourcepub fn generate_configuration_recommendation(
&self,
target: OptimizationTarget,
dataset_size: Option<usize>,
) -> ConfigurationRecommendation
pub fn generate_configuration_recommendation( &self, target: OptimizationTarget, dataset_size: Option<usize>, ) -> ConfigurationRecommendation
Generate configuration recommendations
Sourcepub fn validate_configuration(
&self,
_config: &FastExportConfigBuilder,
) -> ConfigurationValidationResult
pub fn validate_configuration( &self, _config: &FastExportConfigBuilder, ) -> ConfigurationValidationResult
验证配置
Sourcepub fn diagnose_performance(&self) -> PerformanceDiagnosis
pub fn diagnose_performance(&self) -> PerformanceDiagnosis
诊断性能问题
Sourcepub fn add_performance_data(&mut self, result: PerformanceTestResult)
pub fn add_performance_data(&mut self, result: PerformanceTestResult)
添加性能历史数据
Sourcepub fn get_system_resources(&self) -> &SystemResources
pub fn get_system_resources(&self) -> &SystemResources
获取系统资源信息
Sourcepub fn refresh_system_resources(&mut self) -> TrackingResult<()>
pub fn refresh_system_resources(&mut self) -> TrackingResult<()>
更新系统资源信息
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SystemOptimizer
impl RefUnwindSafe for SystemOptimizer
impl Send for SystemOptimizer
impl Sync for SystemOptimizer
impl Unpin for SystemOptimizer
impl UnwindSafe for SystemOptimizer
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> 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