@@ -501,7 +501,7 @@ fn main_options(options: config::Options) -> MainResult {
501501 let crate_name = options. crate_name . clone ( ) ;
502502 let crate_version = options. crate_version . clone ( ) ;
503503 let output_format = options. output_format ;
504- let ( mut krate, renderinfo, renderopts) = core:: run_core ( options) ;
504+ let ( mut krate, renderinfo, renderopts, sess ) = core:: run_core ( options) ;
505505
506506 info ! ( "finished with rustc" ) ;
507507
@@ -524,11 +524,11 @@ fn main_options(options: config::Options) -> MainResult {
524524 let ( error_format, edition, debugging_options) = diag_opts;
525525 let diag = core:: new_handler ( error_format, None , & debugging_options) ;
526526 match output_format {
527- None | Some ( config:: OutputFormat :: Html ) => {
527+ None | Some ( config:: OutputFormat :: Html ) => sess . time ( "render html" , || {
528528 run_renderer :: < html:: render:: Context > ( krate, renderopts, renderinfo, & diag, edition)
529- }
530- Some ( config:: OutputFormat :: Json ) => {
529+ } ) ,
530+ Some ( config:: OutputFormat :: Json ) => sess . time ( "render json" , || {
531531 run_renderer :: < json:: JsonRenderer > ( krate, renderopts, renderinfo, & diag, edition)
532- }
532+ } ) ,
533533 }
534534}
0 commit comments