@@ -235,7 +235,13 @@ async fn create_graphs(
235235 . collect ( ) ;
236236
237237 if request. benchmark . is_none ( ) {
238- let summary_benchmark = create_summary ( ctxt, & interpolated_responses, request. kind ) ?;
238+ let request_profile = request
239+ . profile
240+ . as_ref ( )
241+ . map ( |p| p. parse :: < Profile > ( ) )
242+ . transpose ( ) ?;
243+ let summary_benchmark =
244+ create_summary ( ctxt, & interpolated_responses, request. kind , request_profile) ?;
239245 benchmarks. insert ( "Summary" . to_string ( ) , summary_benchmark) ;
240246 }
241247
@@ -289,12 +295,16 @@ fn create_summary(
289295 Vec < ( ( ArtifactId , Option < f64 > ) , IsInterpolated ) > ,
290296 > ] ,
291297 graph_kind : GraphKind ,
298+ profile : Option < Profile > ,
292299) -> ServerResult < HashMap < Profile , HashMap < String , graphs:: Series > > > {
293300 let mut baselines = HashMap :: new ( ) ;
294301 let mut summary_benchmark = HashMap :: new ( ) ;
295302 let summary_query_cases = iproduct ! (
296303 ctxt. summary_scenarios( ) ,
297- vec![ Profile :: Check , Profile :: Debug , Profile :: Opt , Profile :: Doc ]
304+ profile. map_or_else(
305+ || vec![ Profile :: Check , Profile :: Debug , Profile :: Opt , Profile :: Doc ] ,
306+ |p| vec![ p]
307+ )
298308 ) ;
299309 for ( scenario, profile) in summary_query_cases {
300310 let baseline = match baselines. entry ( ( profile, scenario) ) {
0 commit comments