mirror of
https://github.com/wolfpld/tracy.git
synced 2024-12-01 17:34:36 +00:00
Capture utility also displays failure messages.
This commit is contained in:
parent
5a3856dff0
commit
3cd97138fc
@ -179,6 +179,22 @@ int main( int argc, char** argv )
|
|||||||
std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) );
|
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 ) );
|
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 );
|
fflush( stdout );
|
||||||
auto f = std::unique_ptr<tracy::FileWrite>( tracy::FileWrite::Open( output ) );
|
auto f = std::unique_ptr<tracy::FileWrite>( tracy::FileWrite::Open( output ) );
|
||||||
|
Loading…
Reference in New Issue
Block a user