1use crate::benchmark_suite::{BenchmarkConfig, BenchmarkMetrics};
9use crate::error::StatsResult;
10use serde::{Deserialize, Serialize};
12use std::collections::{BTreeMap, HashMap};
13use std::sync::{Arc, Mutex};
14use std::time::Duration;
15
16#[derive(Debug, Clone, Serialize, Deserialize)]
18#[allow(dead_code)]
19pub struct EnhancedBenchmarkConfig {
20 pub base_config: BenchmarkConfig,
22 pub enable_ai_analysis: bool,
24 pub enable_cross_platform: bool,
26 pub enable_regression_detection: bool,
28 pub enable_optimization_recommendations: bool,
30 pub baselinedatabase_path: Option<String>,
32 pub ml_model_config: MLModelConfig,
34 pub platform_targets: Vec<PlatformTarget>,
36 pub regression_sensitivity: f64,
38}
39
40impl Default for EnhancedBenchmarkConfig {
41 fn default() -> Self {
42 Self {
43 base_config: BenchmarkConfig::default(),
44 enable_ai_analysis: true,
45 enable_cross_platform: true,
46 enable_regression_detection: true,
47 enable_optimization_recommendations: true,
48 baselinedatabase_path: None,
49 ml_model_config: MLModelConfig::default(),
50 platform_targets: vec![
51 PlatformTarget::x86_64_linux(),
52 PlatformTarget::x86_64_windows(),
53 PlatformTarget::aarch64_macos(),
54 ],
55 regression_sensitivity: 0.05, }
57 }
58}
59
60#[derive(Debug, Clone, Serialize, Deserialize)]
62#[allow(dead_code)]
63pub struct MLModelConfig {
64 pub model_type: MLModelType,
66 pub feature_selection: FeatureSelectionStrategy,
68 pub training_retention_days: u32,
70 pub retraining_frequency: RetrainingFrequency,
72 pub confidence_threshold: f64,
74}
75
76impl Default for MLModelConfig {
77 fn default() -> Self {
78 Self {
79 model_type: MLModelType::RandomForest,
80 feature_selection: FeatureSelectionStrategy::AutomaticImportance,
81 training_retention_days: 90,
82 retraining_frequency: RetrainingFrequency::Weekly,
83 confidence_threshold: 0.8,
84 }
85 }
86}
87
88#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
90#[allow(dead_code)]
91pub enum MLModelType {
92 LinearRegression,
93 RandomForest,
94 GradientBoosting,
95 NeuralNetwork,
96 EnsembleModel,
97}
98
99#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
101#[allow(dead_code)]
102pub enum FeatureSelectionStrategy {
103 All, ManualSelection, AutomaticImportance, CorrelationFiltering, PCAReduction, }
109
110#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
112#[allow(dead_code)]
113pub enum RetrainingFrequency {
114 Daily,
115 Weekly,
116 Monthly,
117 OnDemand,
118 AdaptiveTrigger,
119}
120
121#[derive(Debug, Clone, Serialize, Deserialize)]
123#[allow(dead_code)]
124pub struct PlatformTarget {
125 pub arch: String,
127 pub os: String,
129 pub cpu_features: Vec<String>,
131 pub memory_hierarchy: MemoryHierarchy,
133 pub simd_capabilities: SimdCapabilities,
135}
136
137impl PlatformTarget {
138 pub fn x86_64_linux() -> Self {
139 Self {
140 arch: "x86_64".to_string(),
141 os: "linux".to_string(),
142 cpu_features: vec!["avx2".to_string(), "fma".to_string(), "sse4.2".to_string()],
143 memory_hierarchy: MemoryHierarchy::typical_x86_64(),
144 simd_capabilities: SimdCapabilities::avx2(),
145 }
146 }
147
148 pub fn x86_64_windows() -> Self {
149 Self {
150 arch: "x86_64".to_string(),
151 os: "windows".to_string(),
152 cpu_features: vec!["avx2".to_string(), "fma".to_string(), "sse4.2".to_string()],
153 memory_hierarchy: MemoryHierarchy::typical_x86_64(),
154 simd_capabilities: SimdCapabilities::avx2(),
155 }
156 }
157
158 pub fn aarch64_macos() -> Self {
159 Self {
160 arch: "aarch64".to_string(),
161 os: "macos".to_string(),
162 cpu_features: vec!["neon".to_string(), "fp16".to_string()],
163 memory_hierarchy: MemoryHierarchy::apple_silicon(),
164 simd_capabilities: SimdCapabilities::neon(),
165 }
166 }
167}
168
169#[derive(Debug, Clone, Serialize, Deserialize)]
171#[allow(dead_code)]
172pub struct MemoryHierarchy {
173 pub l1_cachesize: usize,
175 pub l2_cachesize: usize,
177 pub l3_cachesize: usize,
179 pub memory_bandwidth: f64,
181 pub cache_linesize: usize,
183}
184
185impl MemoryHierarchy {
186 pub fn typical_x86_64() -> Self {
187 Self {
188 l1_cachesize: 32 * 1024, l2_cachesize: 256 * 1024, l3_cachesize: 8 * 1024 * 1024, memory_bandwidth: 25.6, cache_linesize: 64,
193 }
194 }
195
196 pub fn apple_silicon() -> Self {
197 Self {
198 l1_cachesize: 128 * 1024, l2_cachesize: 4 * 1024 * 1024, l3_cachesize: 32 * 1024 * 1024, memory_bandwidth: 68.25, cache_linesize: 64,
203 }
204 }
205}
206
207#[derive(Debug, Clone, Serialize, Deserialize)]
209#[allow(dead_code)]
210pub struct SimdCapabilities {
211 pub vector_width: usize,
213 pub instruction_sets: Vec<String>,
215 pub f64_lanes: usize,
217 pub f32_lanes: usize,
219}
220
221impl SimdCapabilities {
222 pub fn avx2() -> Self {
223 Self {
224 vector_width: 256,
225 instruction_sets: vec![
226 "sse".to_string(),
227 "sse2".to_string(),
228 "avx".to_string(),
229 "avx2".to_string(),
230 ],
231 f64_lanes: 4,
232 f32_lanes: 8,
233 }
234 }
235
236 pub fn neon() -> Self {
237 Self {
238 vector_width: 128,
239 instruction_sets: vec!["neon".to_string()],
240 f64_lanes: 2,
241 f32_lanes: 4,
242 }
243 }
244}
245
246#[derive(Debug, Serialize, Deserialize)]
248#[allow(dead_code)]
249pub struct EnhancedBenchmarkReport {
250 pub base_report: crate::benchmark_suite::BenchmarkReport,
252 pub ai_analysis: Option<AIPerformanceAnalysis>,
254 pub cross_platform_analysis: Option<CrossPlatformAnalysis>,
256 pub regression_analysis: Option<RegressionAnalysis>,
258 pub optimization_recommendations: Vec<IntelligentRecommendation>,
260 pub performance_predictions: Vec<PerformancePrediction>,
262}
263
264#[derive(Debug, Serialize, Deserialize)]
266#[allow(dead_code)]
267pub struct AIPerformanceAnalysis {
268 pub performance_score: f64,
270 pub bottlenecks: Vec<PerformanceBottleneck>,
272 pub algorithm_recommendations: HashMap<String, String>,
274 pub feature_importance: HashMap<String, f64>,
276 pub performance_clusters: Vec<PerformanceCluster>,
278 pub anomalies: Vec<PerformanceAnomaly>,
280}
281
282#[derive(Debug, Serialize, Deserialize)]
284#[allow(dead_code)]
285pub struct PerformanceBottleneck {
286 pub bottleneck_type: BottleneckType,
288 pub severity: f64,
290 pub affected_operations: Vec<String>,
292 pub performance_impact: f64,
294 pub mitigation_strategies: Vec<String>,
296}
297
298#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
300#[allow(dead_code)]
301pub enum BottleneckType {
302 MemoryBandwidth,
303 CacheMisses,
304 BranchMisprediction,
305 VectorizationOpportunity,
306 ParallelizationOpportunity,
307 AlgorithmChoice,
308 DataLayout,
309 NumericPrecision,
310}
311
312#[derive(Debug, Serialize, Deserialize)]
314#[allow(dead_code)]
315pub struct PerformanceCluster {
316 pub cluster_id: String,
318 pub operations: Vec<String>,
320 pub characteristics: HashMap<String, f64>,
322 pub optimization_strategy: String,
324}
325
326#[derive(Debug, Serialize, Deserialize)]
328#[allow(dead_code)]
329pub struct PerformanceAnomaly {
330 pub anomaly_type: AnomalyType,
332 pub operation: String,
334 pub datasize: usize,
336 pub severity: f64,
338 pub description: String,
340 pub potential_causes: Vec<String>,
342}
343
344#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
346#[allow(dead_code)]
347pub enum AnomalyType {
348 UnexpectedSlowdown,
349 UnexpectedSpeedup,
350 MemorySpike,
351 PerformanceRegression,
352 ScalingAnomaly,
353 PlatformSpecificIssue,
354}
355
356#[derive(Debug, Serialize, Deserialize)]
358#[allow(dead_code)]
359pub struct CrossPlatformAnalysis {
360 pub platform_comparison: HashMap<String, PlatformPerformance>,
362 pub consistency_score: f64,
364 pub platform_optimizations: HashMap<String, Vec<String>>,
366 pub portability_issues: Vec<PortabilityIssue>,
368}
369
370#[derive(Debug, Serialize, Deserialize)]
372#[allow(dead_code)]
373pub struct PlatformPerformance {
374 pub relative_performance: f64,
376 pub memory_efficiency: f64,
378 pub simd_utilization: f64,
380 pub parallel_efficiency: f64,
382 pub strengths: Vec<String>,
384 pub weaknesses: Vec<String>,
386}
387
388#[derive(Debug, Serialize, Deserialize)]
390#[allow(dead_code)]
391pub struct PortabilityIssue {
392 pub issue_type: PortabilityIssueType,
394 pub affected_operations: Vec<String>,
396 pub severity: String,
398 pub description: String,
400 pub recommended_fixes: Vec<String>,
402}
403
404#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
406#[allow(dead_code)]
407pub enum PortabilityIssueType {
408 PlatformSpecificCode,
409 EndiannessDependency,
410 ArchitectureAssumption,
411 CompilerSpecificBehavior,
412 LibraryDependency,
413 PerformanceVariability,
414}
415
416#[derive(Debug, Serialize, Deserialize)]
418#[allow(dead_code)]
419pub struct RegressionAnalysis {
420 pub regression_detected: bool,
422 pub operation_regressions: HashMap<String, OperationRegression>,
424 pub performance_trends: HashMap<String, PerformanceTrend>,
426 pub severity_assessment: RegressionSeverity,
428}
429
430#[derive(Debug, Serialize, Deserialize)]
432#[allow(dead_code)]
433pub struct OperationRegression {
434 pub percentage_change: f64,
436 pub statistical_significance: f64,
438 pub confidence_interval: (f64, f64),
440 pub potential_causes: Vec<String>,
442}
443
444#[derive(Debug, Serialize, Deserialize)]
446#[allow(dead_code)]
447pub struct PerformanceTrend {
448 pub trend_direction: TrendDirection,
450 pub trend_strength: f64,
452 pub change_rate: f64,
454 pub forecast: PerformanceForecast,
456}
457
458#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
460#[allow(dead_code)]
461pub enum TrendDirection {
462 Improving,
463 Stable,
464 Degrading,
465 Volatile,
466}
467
468#[derive(Debug, Serialize, Deserialize)]
470#[allow(dead_code)]
471pub struct PerformanceForecast {
472 pub predicted_performance: f64,
474 pub confidence_interval: (f64, f64),
476 pub reliability_score: f64,
478}
479
480#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
482#[allow(dead_code)]
483pub enum RegressionSeverity {
484 None,
485 Minor, Moderate, Severe, Critical, }
490
491#[derive(Debug, Serialize, Deserialize)]
493#[allow(dead_code)]
494pub struct IntelligentRecommendation {
495 pub category: RecommendationCategory,
497 pub priority: RecommendationPriority,
499 pub affected_areas: Vec<String>,
501 pub recommendation: String,
503 pub estimated_improvement: f64,
505 pub implementation_effort: ImplementationEffort,
507 pub implementation_details: Vec<String>,
509}
510
511#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
513#[allow(dead_code)]
514pub enum RecommendationCategory {
515 AlgorithmOptimization,
516 SIMDUtilization,
517 ParallelProcessing,
518 MemoryOptimization,
519 CacheEfficiency,
520 DataLayout,
521 CompilerOptimizations,
522 HardwareUtilization,
523}
524
525#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
527#[allow(dead_code)]
528pub enum RecommendationPriority {
529 Critical, High, Medium, Low, }
534
535#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
537#[allow(dead_code)]
538pub enum ImplementationEffort {
539 Trivial, Low, Medium, High, Complex, }
545
546#[derive(Debug, Serialize, Deserialize)]
548#[allow(dead_code)]
549pub struct PerformancePrediction {
550 pub workload_characteristics: WorkloadCharacteristics,
552 pub predicted_execution_time: Duration,
554 pub predicted_memory_usage: usize,
556 pub confidence_score: f64,
558 pub recommended_configuration: HashMap<String, String>,
560}
561
562#[derive(Debug, Serialize, Deserialize)]
564#[allow(dead_code)]
565pub struct WorkloadCharacteristics {
566 pub datasize: usize,
568 pub operation_type: String,
570 pub data_distribution: String,
572 pub accuracy_requirement: String,
574 pub performance_preference: f64,
576}
577
578pub struct EnhancedBenchmarkSuite {
580 config: EnhancedBenchmarkConfig,
581 #[allow(dead_code)]
582 performancedatabase: Arc<Mutex<PerformanceDatabase>>,
583 #[allow(dead_code)]
584 ml_model: Arc<Mutex<Option<PerformanceMLModel>>>,
585}
586
587impl EnhancedBenchmarkSuite {
588 pub fn new(config: EnhancedBenchmarkConfig) -> Self {
590 Self {
591 performancedatabase: Arc::new(Mutex::new(PerformanceDatabase::new())),
592 ml_model: Arc::new(Mutex::new(None)),
593 config,
594 }
595 }
596
597 pub fn run_enhanced_benchmarks(&mut self) -> StatsResult<EnhancedBenchmarkReport> {
599 let base_suite =
601 crate::benchmark_suite::BenchmarkSuite::with_config(self.config.base_config.clone());
602
603 let base_report = crate::benchmark_suite::BenchmarkReport {
605 timestamp: chrono::Utc::now().to_rfc3339(),
606 config: self.config.base_config.clone(),
607 metrics: vec![], analysis: crate::benchmark_suite::PerformanceAnalysis {
609 overall_score: 0.0,
610 simd_effectiveness: HashMap::new(),
611 parallel_effectiveness: HashMap::new(),
612 memory_efficiency: 0.0,
613 regressions: vec![],
614 scaling_analysis: crate::benchmark_suite::ScalingAnalysis {
615 complexity_analysis: HashMap::new(),
616 threshold_recommendations: HashMap::new(),
617 memory_scaling: HashMap::new(),
618 },
619 },
620 system_info: crate::benchmark_suite::SystemInfo {
621 cpu_info: "Unknown".to_string(),
622 total_memory: 0,
623 cpu_cores: 0,
624 simd_capabilities: vec![],
625 os_info: "Unknown".to_string(),
626 rust_version: "Unknown".to_string(),
627 },
628 recommendations: vec![],
629 };
630
631 let ai_analysis = if self.config.enable_ai_analysis {
633 Some(self.perform_ai_analysis(&base_report.metrics)?)
634 } else {
635 None
636 };
637
638 let cross_platform_analysis = if self.config.enable_cross_platform {
640 Some(self.perform_cross_platform_analysis()?)
641 } else {
642 None
643 };
644
645 let regression_analysis = if self.config.enable_regression_detection {
647 Some(self.perform_regression_analysis(&base_report.metrics)?)
648 } else {
649 None
650 };
651
652 let optimization_recommendations = if self.config.enable_optimization_recommendations {
654 self.generate_intelligent_recommendations(
655 &base_report.metrics,
656 &ai_analysis,
657 &cross_platform_analysis,
658 ®ression_analysis,
659 )?
660 } else {
661 vec![]
662 };
663
664 let performance_predictions = self.generate_performance_predictions()?;
666
667 Ok(EnhancedBenchmarkReport {
668 base_report,
669 ai_analysis,
670 cross_platform_analysis,
671 regression_analysis,
672 optimization_recommendations,
673 performance_predictions,
674 })
675 }
676
677 fn perform_ai_analysis(
679 &self,
680 _metrics: &[BenchmarkMetrics],
681 ) -> StatsResult<AIPerformanceAnalysis> {
682 Ok(AIPerformanceAnalysis {
684 performance_score: 85.0,
685 bottlenecks: vec![PerformanceBottleneck {
686 bottleneck_type: BottleneckType::VectorizationOpportunity,
687 severity: 70.0,
688 affected_operations: vec!["variance".to_string(), "correlation".to_string()],
689 performance_impact: 25.0,
690 mitigation_strategies: vec![
691 "Implement SIMD vectorization for variance calculation".to_string(),
692 "Use auto-vectorized correlation algorithms".to_string(),
693 ],
694 }],
695 algorithm_recommendations: HashMap::from([
696 (
697 "largedatasets".to_string(),
698 "parallel_processing".to_string(),
699 ),
700 ("smalldatasets".to_string(), "simd_optimization".to_string()),
701 ]),
702 feature_importance: HashMap::from([
703 ("datasize".to_string(), 0.65),
704 ("algorithm_type".to_string(), 0.45),
705 ("memory_bandwidth".to_string(), 0.35),
706 ("simd_capabilities".to_string(), 0.55),
707 ]),
708 performance_clusters: vec![PerformanceCluster {
709 cluster_id: "memory_intensive_ops".to_string(),
710 operations: vec![
711 "correlation_matrix".to_string(),
712 "covariance_matrix".to_string(),
713 ],
714 characteristics: HashMap::from([
715 ("memory_bound".to_string(), 0.8),
716 ("cache_sensitive".to_string(), 0.9),
717 ]),
718 optimization_strategy: "Cache-aware chunking and memory prefetching".to_string(),
719 }],
720 anomalies: vec![],
721 })
722 }
723
724 fn perform_cross_platform_analysis(&self) -> StatsResult<CrossPlatformAnalysis> {
726 Ok(CrossPlatformAnalysis {
728 platform_comparison: HashMap::from([
729 (
730 "x86_64_linux".to_string(),
731 PlatformPerformance {
732 relative_performance: 1.0,
733 memory_efficiency: 0.85,
734 simd_utilization: 0.90,
735 parallel_efficiency: 0.88,
736 strengths: vec![
737 "Excellent SIMD support".to_string(),
738 "Good parallel scaling".to_string(),
739 ],
740 weaknesses: vec!["Memory bandwidth limited".to_string()],
741 },
742 ),
743 (
744 "aarch64_macos".to_string(),
745 PlatformPerformance {
746 relative_performance: 1.15,
747 memory_efficiency: 0.95,
748 simd_utilization: 0.75,
749 parallel_efficiency: 0.92,
750 strengths: vec![
751 "Superior memory bandwidth".to_string(),
752 "Efficient cores".to_string(),
753 ],
754 weaknesses: vec!["Limited SIMD width".to_string()],
755 },
756 ),
757 ]),
758 consistency_score: 0.92,
759 platform_optimizations: HashMap::from([
760 (
761 "x86_64".to_string(),
762 vec!["Use AVX2 for vectorization".to_string()],
763 ),
764 (
765 "aarch64".to_string(),
766 vec!["Leverage memory bandwidth".to_string()],
767 ),
768 ]),
769 portability_issues: vec![],
770 })
771 }
772
773 fn perform_regression_analysis(
775 &self,
776 _metrics: &[BenchmarkMetrics],
777 ) -> StatsResult<RegressionAnalysis> {
778 Ok(RegressionAnalysis {
780 regression_detected: false,
781 operation_regressions: HashMap::new(),
782 performance_trends: HashMap::from([(
783 "mean_calculation".to_string(),
784 PerformanceTrend {
785 trend_direction: TrendDirection::Stable,
786 trend_strength: 0.15,
787 change_rate: 0.02,
788 forecast: PerformanceForecast {
789 predicted_performance: 1.02,
790 confidence_interval: (0.98, 1.06),
791 reliability_score: 0.88,
792 },
793 },
794 )]),
795 severity_assessment: RegressionSeverity::None,
796 })
797 }
798
799 #[allow(clippy::too_many_arguments)]
801 fn generate_intelligent_recommendations(
802 &self,
803 _metrics: &[BenchmarkMetrics],
804 _ai_analysis: &Option<AIPerformanceAnalysis>,
805 _cross_platform: &Option<CrossPlatformAnalysis>,
806 _regression: &Option<RegressionAnalysis>,
807 ) -> StatsResult<Vec<IntelligentRecommendation>> {
808 Ok(vec![
809 IntelligentRecommendation {
810 category: RecommendationCategory::SIMDUtilization,
811 priority: RecommendationPriority::High,
812 affected_areas: vec!["descriptive_statistics".to_string()],
813 recommendation: "Implement AVX2 SIMD vectorization for variance and standard deviation calculations to achieve 3-4x performance improvement on x86_64 platforms.".to_string(),
814 estimated_improvement: 250.0, implementation_effort: ImplementationEffort::Medium,
816 implementation_details: vec![
817 "Use scirs2_core::simd_ops::SimdUnifiedOps for vectorization".to_string(),
818 "Implement chunked processing for cache efficiency".to_string(),
819 "Add fallback for non-SIMD platforms".to_string(),
820 ],
821 },
822 IntelligentRecommendation {
823 category: RecommendationCategory::ParallelProcessing,
824 priority: RecommendationPriority::Medium,
825 affected_areas: vec!["correlation_analysis".to_string()],
826 recommendation: "Implement parallel correlation matrix computation using Rayon for datasets larger than 10,000 elements.".to_string(),
827 estimated_improvement: 180.0, implementation_effort: ImplementationEffort::Low,
829 implementation_details: vec![
830 "Use scirs2_core::parallel_ops for thread management".to_string(),
831 "Implement work-stealing for load balancing".to_string(),
832 "Add dynamic threshold based on system capabilities".to_string(),
833 ],
834 },
835 ])
836 }
837
838 fn generate_performance_predictions(&self) -> StatsResult<Vec<PerformancePrediction>> {
840 Ok(vec![PerformancePrediction {
841 workload_characteristics: WorkloadCharacteristics {
842 datasize: 1_000_000,
843 operation_type: "correlation_matrix".to_string(),
844 data_distribution: "normal".to_string(),
845 accuracy_requirement: "high".to_string(),
846 performance_preference: 0.7,
847 },
848 predicted_execution_time: Duration::from_millis(250),
849 predicted_memory_usage: 32 * 1024 * 1024, confidence_score: 0.87,
851 recommended_configuration: HashMap::from([
852 ("algorithm".to_string(), "parallel_simd".to_string()),
853 ("chunksize".to_string(), "8192".to_string()),
854 ("num_threads".to_string(), "auto".to_string()),
855 ]),
856 }])
857 }
858}
859
860#[allow(dead_code)]
862struct PerformanceDatabase {
863 historicaldata: BTreeMap<String, Vec<BenchmarkMetrics>>,
864}
865
866impl PerformanceDatabase {
867 fn new() -> Self {
868 Self {
869 historicaldata: BTreeMap::new(),
870 }
871 }
872}
873
874#[allow(dead_code)]
876struct PerformanceMLModel {
877 model_type: MLModelType,
878 trained: bool,
879}
880
881impl PerformanceMLModel {
882 #[allow(dead_code)]
883 fn new(modeltype: MLModelType) -> Self {
884 Self {
885 model_type: modeltype,
886 trained: false,
887 }
888 }
889}
890
891#[allow(dead_code)]
893pub fn create_enhanced_benchmark_suite() -> EnhancedBenchmarkSuite {
894 EnhancedBenchmarkSuite::new(EnhancedBenchmarkConfig::default())
895}
896
897#[allow(dead_code)]
899pub fn create_configured_enhanced_benchmark_suite(
900 config: EnhancedBenchmarkConfig,
901) -> EnhancedBenchmarkSuite {
902 EnhancedBenchmarkSuite::new(config)
903}
904
905#[allow(dead_code)]
907pub fn run_quick_ai_analysis(
908 datasize: usize,
909 _operation: &str,
910) -> StatsResult<Vec<IntelligentRecommendation>> {
911 let config = EnhancedBenchmarkConfig {
912 base_config: BenchmarkConfig {
913 datasizes: vec![datasize],
914 iterations: 10,
915 ..Default::default()
916 },
917 ..Default::default()
918 };
919
920 let mut suite = EnhancedBenchmarkSuite::new(config);
921 let report = suite.run_enhanced_benchmarks()?;
922
923 Ok(report.optimization_recommendations)
924}