From 7da72e51d28a29ef8b1ac4012a93dde1ddff7f0b Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 1 Jul 2026 15:35:02 +0200 Subject: [PATCH] Compare FPS ranges for frames. --- profiler/src/profiler/TracyView_Compare.cpp | 32 +++++++++++++++++---- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/profiler/src/profiler/TracyView_Compare.cpp b/profiler/src/profiler/TracyView_Compare.cpp index fc2a607f..daedc871 100644 --- a/profiler/src/profiler/TracyView_Compare.cpp +++ b/profiler/src/profiler/TracyView_Compare.cpp @@ -986,16 +986,38 @@ void View::DrawCompare() TextColoredUnformatted( ImVec4( 0xDD/511.f, 0xDD/511.f, 0x22/511.f, 1.f ), ICON_FA_LEMON ); ImGui::SameLine(); - TextFocused( "Total time (this):", TimeToString( total0 * adj0 ) ); + if( zonesMode ) + { + TextFocused( "Total time (this):", TimeToString( total0 * adj0 ) ); + } + else + { + const auto tmin = sorted[0].front(); + const auto tmax = sorted[0].back(); + TextDisabledUnformatted( "FPS range (this):" ); + ImGui::SameLine(); + ImGui::Text( "%s FPS - %s FPS", RealToString( round( 1000000000.0 / tmin ) ), RealToString( round( 1000000000.0 / tmax ) ) ); + } ImGui::SameLine(); ImGui::Spacing(); ImGui::SameLine(); TextColoredUnformatted( ImVec4( 0xDD/511.f, 0x22/511.f, 0x22/511.f, 1.f ), ICON_FA_GEM ); ImGui::SameLine(); - TextFocused( "Total time (ext.):", TimeToString( total1 * adj1 ) ); - ImGui::Indent(); - PrintSpeedupOrSlowdown( total0 * adj0, total1 * adj1, "Total time" ); - ImGui::Unindent(); + if( zonesMode ) + { + TextFocused( "Total time (ext.):", TimeToString( total1 * adj1 ) ); + ImGui::Indent(); + PrintSpeedupOrSlowdown( total0 * adj0, total1 * adj1, "Total time" ); + ImGui::Unindent(); + } + else + { + const auto tmin = sorted[1].front(); + const auto tmax = sorted[1].back(); + TextDisabledUnformatted( "FPS range (ext.):" ); + ImGui::SameLine(); + ImGui::Text( "%s FPS - %s FPS", RealToString( round( 1000000000.0 / tmin ) ), RealToString( round( 1000000000.0 / tmax ) ) ); + } TextFocused( "Max counts:", cumulateTime ? TimeToString( maxVal ) : RealToString( floor( maxVal ) ) ); TextColoredUnformatted( ImVec4( 0xDD/511.f, 0xDD/511.f, 0x22/511.f, 1.f ), ICON_FA_LEMON );