diff options
author | Bartosz Taudul <wolf.pld@gmail.com> | 2019-01-15 01:52:38 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf.pld@gmail.com> | 2019-01-15 01:52:38 +0300 |
commit | 3cd97138fcebed2003996f965b9a3fd5d53f63df (patch) | |
tree | 262a8b9724cf7bbd4342efa84d942f3085284878 /capture | |
parent | 5a3856dff0edd215d0e5bd461412b6533099336f (diff) |
Capture utility also displays failure messages.
Diffstat (limited to 'capture')
-rw-r--r-- | capture/src/capture.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/capture/src/capture.cpp b/capture/src/capture.cpp index 32656ace..a2794bc4 100644 --- a/capture/src/capture.cpp +++ b/capture/src/capture.cpp @@ -179,6 +179,22 @@ int main( int argc, char** argv ) std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) ); } + const auto& failure = worker.GetFailureType(); + if( failure != tracy::Worker::Failure::None ) + { + printf( "\n\033[31;1mInstrumentation failure: " ); + switch( failure ) + { + case tracy::Worker::Failure::ZoneStack: + printf( "Invalid order of zone begin and end events." ); + break; + default: + printf( "<unknown reason>" ); + break; + } + printf( "\033[0m" ); + } + printf( "\nFrames: %" PRIu64 "\nTime span: %s\nZones: %s\nSaving trace...", worker.GetFrameCount( *worker.GetFramesBase() ), TimeToString( worker.GetLastTime() - worker.GetTimeBegin() ), RealToString( worker.GetZoneCount(), true ) ); fflush( stdout ); auto f = std::unique_ptr<tracy::FileWrite>( tracy::FileWrite::Open( output ) ); |