Add type_name info to [TIMING] log output
This commit is contained in:
parent
b759b22186
commit
0fea00759f
1 changed files with 11 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
use std::any::Any;
|
||||
use std::any::{type_name, Any};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::collections::BTreeSet;
|
||||
use std::env;
|
||||
|
@ -1763,7 +1763,16 @@ impl<'a> Builder<'a> {
|
|||
};
|
||||
|
||||
if self.config.print_step_timings && !self.config.dry_run {
|
||||
println!("[TIMING] {:?} -- {}.{:03}", step, dur.as_secs(), dur.subsec_millis());
|
||||
let step_string = format!("{:?}", step);
|
||||
let brace_index = step_string.find("{").unwrap_or(0);
|
||||
let type_string = type_name::<S>();
|
||||
println!(
|
||||
"[TIMING] {} {} -- {}.{:03}",
|
||||
&type_string.strip_prefix("bootstrap::").unwrap_or(type_string),
|
||||
&step_string[brace_index..],
|
||||
dur.as_secs(),
|
||||
dur.subsec_millis()
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue