@@ -217,7 +217,7 @@ fn print(
217
217
total : Option < Duration > ,
218
218
) {
219
219
let mut last = 0 ;
220
- let indent = repeat ( " " ) . take ( lvl + 1 ) . collect :: < String > ( ) ;
220
+ let indent = repeat ( " " ) . take ( lvl) . collect :: < String > ( ) ;
221
221
// We output hierarchy for long calls, but sum up all short calls
222
222
let mut short = Vec :: new ( ) ;
223
223
let mut accounted_for = Duration :: default ( ) ;
@@ -227,7 +227,7 @@ fn print(
227
227
}
228
228
accounted_for += duration;
229
229
if duration >= longer_than {
230
- writeln ! ( out, "{} {:6 }ms - {}" , indent, duration. as_millis( ) , msg)
230
+ writeln ! ( out, "{}{:5 }ms - {}" , indent, duration. as_millis( ) , msg)
231
231
. expect ( "printing profiling info to stdout" ) ;
232
232
233
233
print ( lvl + 1 , & msgs[ last..i] , out, longer_than, Some ( duration) ) ;
@@ -245,14 +245,14 @@ fn print(
245
245
count += 1 ;
246
246
total_duration += * time;
247
247
} ) ;
248
- writeln ! ( out, "{} {:6 }ms - {} ({} calls)" , indent, total_duration. as_millis( ) , msg, count)
248
+ writeln ! ( out, "{}{:5 }ms - {} ({} calls)" , indent, total_duration. as_millis( ) , msg, count)
249
249
. expect ( "printing profiling info to stdout" ) ;
250
250
}
251
251
252
252
if let Some ( total) = total {
253
253
if let Some ( unaccounted) = total. checked_sub ( accounted_for) {
254
254
if unaccounted >= longer_than && last > 0 {
255
- writeln ! ( out, "{} {:6 }ms - ???" , indent, unaccounted. as_millis( ) )
255
+ writeln ! ( out, "{}{:5 }ms - ???" , indent, unaccounted. as_millis( ) )
256
256
. expect ( "printing profiling info to stdout" ) ;
257
257
}
258
258
}
0 commit comments