@@ -501,7 +501,7 @@ fn main_options(options: config::Options) -> MainResult {
501
501
let crate_name = options. crate_name . clone ( ) ;
502
502
let crate_version = options. crate_version . clone ( ) ;
503
503
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) ;
505
505
506
506
info ! ( "finished with rustc" ) ;
507
507
@@ -524,11 +524,11 @@ fn main_options(options: config::Options) -> MainResult {
524
524
let ( error_format, edition, debugging_options) = diag_opts;
525
525
let diag = core:: new_handler ( error_format, None , & debugging_options) ;
526
526
match output_format {
527
- None | Some ( config:: OutputFormat :: Html ) => {
527
+ None | Some ( config:: OutputFormat :: Html ) => sess . time ( "render html" , || {
528
528
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" , || {
531
531
run_renderer :: < json:: JsonRenderer > ( krate, renderopts, renderinfo, & diag, edition)
532
- }
532
+ } ) ,
533
533
}
534
534
}
0 commit comments