@@ -10,7 +10,15 @@ use std::collections::HashMap;
1010pub struct ComparativeAnalysis {
1111 name : String ,
1212 variants : HashMap < String , Box < dyn FnMut ( ) + Send > > ,
13- results : HashMap < String , BenchmarkResult > ,
13+ }
14+
15+ impl std:: fmt:: Debug for ComparativeAnalysis {
16+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
17+ f. debug_struct ( "ComparativeAnalysis" )
18+ . field ( "name" , & self . name )
19+ . field ( "variants" , & format ! ( "{} variants" , self . variants. len( ) ) )
20+ . finish ( )
21+ }
1422}
1523
1624impl ComparativeAnalysis {
@@ -19,7 +27,6 @@ impl ComparativeAnalysis {
1927 Self {
2028 name : name. into ( ) ,
2129 variants : HashMap :: new ( ) ,
22- results : HashMap :: new ( ) ,
2330 }
2431 }
2532
@@ -59,7 +66,9 @@ impl ComparativeAnalysis {
5966/// Report containing results of comparative analysis
6067#[ derive( Debug ) ]
6168pub struct ComparisonReport {
69+ /// Name of the comparison analysis
6270 pub name : String ,
71+ /// Results of each algorithm variant tested
6372 pub results : HashMap < String , BenchmarkResult > ,
6473}
6574
@@ -166,7 +175,9 @@ impl ComparisonReport {
166175/// Performance regression analysis
167176#[ derive( Debug , Clone ) ]
168177pub struct RegressionAnalysis {
178+ /// Baseline benchmark results to compare against
169179 pub baseline_results : HashMap < String , BenchmarkResult > ,
180+ /// Current benchmark results being analyzed
170181 pub current_results : HashMap < String , BenchmarkResult > ,
171182}
172183
0 commit comments