@@ -77,6 +77,8 @@ pub struct Capture {
7777 pub post_layout : Instant ,
7878 pub end : Instant ,
7979 pub taffy_duration : Duration ,
80+ pub taffy_node_count : usize ,
81+ pub taffy_depth : usize ,
8082 pub window : Option < Rc < DynamicImage > > ,
8183 pub window_size : Size ,
8284 pub scale : f64 ,
@@ -305,13 +307,24 @@ fn stats(capture: &Capture) -> impl View {
305307 "Taffy time" ,
306308 format ! ( "{:.4} ms" , capture. taffy_duration. as_secs_f64( ) * 1000.0 ) ,
307309 ) ;
310+ let taffy_node_count = info ( "Taffy node count" , capture. taffy_node_count . to_string ( ) ) ;
311+ let taffy_depth = info ( "Taffy depth" , capture. taffy_depth . to_string ( ) ) ;
308312 let paint_time = info (
309313 "Paint time" ,
310314 format ! ( "Paint time: {:.4} ms" , paint_time. as_secs_f64( ) * 1000.0 ) ,
311315 ) ;
312316 let w = info ( "Window Width" , format ! ( "{}" , capture. window_size. width) ) ;
313317 let h = info ( "Window Height" , format ! ( "{}" , capture. window_size. height) ) ;
314- stack ( ( layout_time, taffy_time, paint_time, w, h) ) . style ( |s| s. flex_col ( ) )
318+ stack ( (
319+ layout_time,
320+ taffy_time,
321+ taffy_node_count,
322+ taffy_depth,
323+ paint_time,
324+ w,
325+ h,
326+ ) )
327+ . style ( |s| s. flex_col ( ) )
315328}
316329
317330fn selected_view ( capture : & Rc < Capture > , selected : RwSignal < Option < Id > > ) -> impl View {
0 commit comments