Skip to content

Commit 73f09de

Browse files
committed
Fix savings calculation.
1 parent 8983e14 commit 73f09de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎profiler/src/profiler/TracyView_Compare.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ void View::DrawCompare()
968968
TextFocused( "Savings:", TimeToString( total1 * adj1 - total0 * adj0 ) );
969969
ImGui::SameLine();
970970
char buf[64];
971-
PrintStringPercent( buf, ( total0 * adj0 ) / ( total1 * adj1 ) * 100 );
971+
PrintStringPercent( buf, (1.0 - ( total0 * adj0 ) / ( total1 * adj1 )) * 100 );
972972
TextDisabledUnformatted( buf );
973973
TextFocused( "Max counts:", cumulateTime ? TimeToString( maxVal ) : RealToString( floor( maxVal ) ) );
974974

0 commit comments

Comments
 (0)