From 5730884678e20ecd3b156f4bc18039f5360b08b0 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 5 May 2024 21:20:53 +0200 Subject: [PATCH] Print memory limit in capture utility, if appropriate. --- capture/src/capture.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/capture/src/capture.cpp b/capture/src/capture.cpp index 55dbb946..9dc22bde 100644 --- a/capture/src/capture.cpp +++ b/capture/src/capture.cpp @@ -238,9 +238,14 @@ int main( int argc, char** argv ) AnsiPrintf( ANSI_YELLOW ANSI_BOLD, "%7.2f Mbps", mbps / compRatio ); printf( " | "); AnsiPrintf( ANSI_YELLOW, "Tx: "); - AnsiPrintf( ANSI_GREEN, "%s", tracy::MemSizeToString( netTotal ) ); + AnsiPrintf( ANSI_GREEN, "%s", tracy::MemSizeToString( netTotal ) ); printf( " | "); AnsiPrintf( ANSI_RED ANSI_BOLD, "%s", tracy::MemSizeToString( tracy::memUsage.load( std::memory_order_relaxed ) ) ); + if( memoryLimit > 0 ) + { + printf( " / " ); + AnsiPrintf( ANSI_BLUE ANSI_BOLD, "%s", tracy::MemSizeToString( memoryLimit ) ); + } printf( " | "); AnsiPrintf( ANSI_RED, "%s", tracy::TimeToString( worker.GetLastTime() - firstTime ) ); fflush( stdout );