tty: Rename presentation target offset plot to misprediction
Browse files at this commit588e6d7cdd3e5226b726f428b545042813f92b3aParent: 19cafff1 changed file +10 -9
- src/backend/tty.rs +10 -9
src/backend/tty.rsmodified+10 -9
| @@ -94,8 +94,8 @@ struct Surface { | |||
| 94 | vblank_frame_name: tracy_client::FrameName, | 94 | vblank_frame_name: tracy_client::FrameName, |
| 95 | /// Plot name for the VBlank dispatch offset plot. | 95 | /// Plot name for the VBlank dispatch offset plot. |
| 96 | vblank_plot_name: tracy_client::PlotName, | 96 | vblank_plot_name: tracy_client::PlotName, |
| 97 | - /// Plot name for the presentation target offset plot. | 97 | + /// Plot name for the presentation misprediction plot. |
| 98 | - presentation_plot_name: tracy_client::PlotName, | 98 | + presentation_misprediction_plot_name: tracy_client::PlotName, |
| 99 | sequence_delta_plot_name: tracy_client::PlotName, | 99 | sequence_delta_plot_name: tracy_client::PlotName, |
| 100 | } | 100 | } |
| 101 | 101 | ||
| @@ -588,8 +588,8 @@ impl Tty { | |||
| 588 | tracy_client::FrameName::new_leak(format!("vblank on {output_name}")); | 588 | tracy_client::FrameName::new_leak(format!("vblank on {output_name}")); |
| 589 | let vblank_plot_name = | 589 | let vblank_plot_name = |
| 590 | tracy_client::PlotName::new_leak(format!("{output_name} vblank dispatch offset, ms")); | 590 | tracy_client::PlotName::new_leak(format!("{output_name} vblank dispatch offset, ms")); |
| 591 | - let presentation_plot_name = tracy_client::PlotName::new_leak(format!( | 591 | + let presentation_misprediction_plot_name = tracy_client::PlotName::new_leak(format!( |
| 592 | - "{output_name} presentation target offset, ms" | 592 | + "{output_name} presentation misprediction, ms" |
| 593 | )); | 593 | )); |
| 594 | let sequence_delta_plot_name = | 594 | let sequence_delta_plot_name = |
| 595 | tracy_client::PlotName::new_leak(format!("{output_name} sequence delta")); | 595 | tracy_client::PlotName::new_leak(format!("{output_name} sequence delta")); |
| @@ -606,7 +606,7 @@ impl Tty { | |||
| 606 | vblank_frame: None, | 606 | vblank_frame: None, |
| 607 | vblank_frame_name, | 607 | vblank_frame_name, |
| 608 | vblank_plot_name, | 608 | vblank_plot_name, |
| 609 | - presentation_plot_name, | 609 | + presentation_misprediction_plot_name, |
| 610 | sequence_delta_plot_name, | 610 | sequence_delta_plot_name, |
| 611 | }; | 611 | }; |
| 612 | let res = device.surfaces.insert(crtc, surface); | 612 | let res = device.surfaces.insert(crtc, surface); |
| @@ -748,11 +748,12 @@ impl Tty { | |||
| 748 | ); | 748 | ); |
| 749 | 749 | ||
| 750 | if !presentation_time.is_zero() { | 750 | if !presentation_time.is_zero() { |
| 751 | - let diff = | 751 | + let misprediction_s = |
| 752 | presentation_time.as_secs_f64() - target_presentation_time.as_secs_f64(); | 752 | presentation_time.as_secs_f64() - target_presentation_time.as_secs_f64(); |
| 753 | - tracy_client::Client::running() | 753 | + tracy_client::Client::running().unwrap().plot( |
| 754 | - .unwrap() | 754 | + surface.presentation_misprediction_plot_name, |
| 755 | - .plot(surface.presentation_plot_name, diff * 1000.); | 755 | + misprediction_s * 1000., |
| 756 | + ); | ||
| 756 | } | 757 | } |
| 757 | } | 758 | } |
| 758 | Ok(None) => (), | 759 | Ok(None) => (), |