mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Statistics window shell.
This commit is contained in:
parent
a9e1a9bddb
commit
3a49e9a4be
@ -167,6 +167,7 @@ View::View( const char* addr )
|
|||||||
, m_gpuEnd( 0 )
|
, m_gpuEnd( 0 )
|
||||||
, m_showOptions( false )
|
, m_showOptions( false )
|
||||||
, m_showMessages( false )
|
, m_showMessages( false )
|
||||||
|
, m_showStatistics( false )
|
||||||
, m_drawGpuZones( true )
|
, m_drawGpuZones( true )
|
||||||
, m_drawZones( true )
|
, m_drawZones( true )
|
||||||
, m_drawLocks( true )
|
, m_drawLocks( true )
|
||||||
@ -294,7 +295,9 @@ void View::DrawImpl()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if( ImGui::Button( "Messages", ImVec2( 70, 0 ) ) ) m_showMessages = true;
|
if( ImGui::Button( "Messages", ImVec2( 70, 0 ) ) ) m_showMessages = true;
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if ( ImGui::Button( "Find Zone", ImVec2( 70, 0 ) ) ) m_findZone.show = true;
|
if( ImGui::Button( "Find Zone", ImVec2( 70, 0 ) ) ) m_findZone.show = true;
|
||||||
|
ImGui::SameLine();
|
||||||
|
if( ImGui::Button( "Statistics", ImVec2( 70, 0 ) ) ) m_showStatistics = true;
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Text( "Frames: %-7" PRIu64 " Time span: %-10s View span: %-10s Zones: %-13s Queue delay: %s Timer resolution: %s", m_worker.GetFrameCount(), TimeToString( m_worker.GetLastTime() - m_worker.GetFrameBegin( 0 ) ), TimeToString( m_zvEnd - m_zvStart ), RealToString( m_worker.GetZoneCount(), true ), TimeToString( m_worker.GetDelay() ), TimeToString( m_worker.GetResolution() ) );
|
ImGui::Text( "Frames: %-7" PRIu64 " Time span: %-10s View span: %-10s Zones: %-13s Queue delay: %s Timer resolution: %s", m_worker.GetFrameCount(), TimeToString( m_worker.GetLastTime() - m_worker.GetFrameBegin( 0 ) ), TimeToString( m_zvEnd - m_zvStart ), RealToString( m_worker.GetZoneCount(), true ), TimeToString( m_worker.GetDelay() ), TimeToString( m_worker.GetResolution() ) );
|
||||||
DrawFrames();
|
DrawFrames();
|
||||||
@ -309,6 +312,7 @@ void View::DrawImpl()
|
|||||||
if( m_showOptions ) DrawOptions();
|
if( m_showOptions ) DrawOptions();
|
||||||
if( m_showMessages ) DrawMessages();
|
if( m_showMessages ) DrawMessages();
|
||||||
if( m_findZone.show ) DrawFindZone();
|
if( m_findZone.show ) DrawFindZone();
|
||||||
|
if( m_showStatistics ) DrawStatistics();
|
||||||
|
|
||||||
if( m_zoomAnim.active )
|
if( m_zoomAnim.active )
|
||||||
{
|
{
|
||||||
@ -3447,6 +3451,18 @@ void View::DrawFindZone()
|
|||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void View::DrawStatistics()
|
||||||
|
{
|
||||||
|
ImGui::Begin( "Statistics", &m_showStatistics );
|
||||||
|
#ifdef TRACY_NO_STATISTICS
|
||||||
|
ImGui::TextWrapped( "Collection of statistical data is disabled in this build." );
|
||||||
|
ImGui::TextWrapped( "Rebuild without the TRACY_NO_STATISTICS macro to enable statistics view." );
|
||||||
|
#else
|
||||||
|
|
||||||
|
#endif
|
||||||
|
ImGui::End();
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t View::GetZoneColor( const ZoneEvent& ev )
|
uint32_t View::GetZoneColor( const ZoneEvent& ev )
|
||||||
{
|
{
|
||||||
const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc );
|
const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc );
|
||||||
|
@ -73,6 +73,7 @@ private:
|
|||||||
void DrawOptions();
|
void DrawOptions();
|
||||||
void DrawMessages();
|
void DrawMessages();
|
||||||
void DrawFindZone();
|
void DrawFindZone();
|
||||||
|
void DrawStatistics();
|
||||||
|
|
||||||
void DrawInfoWindow();
|
void DrawInfoWindow();
|
||||||
void DrawZoneInfoWindow();
|
void DrawZoneInfoWindow();
|
||||||
@ -157,6 +158,7 @@ private:
|
|||||||
|
|
||||||
bool m_showOptions;
|
bool m_showOptions;
|
||||||
bool m_showMessages;
|
bool m_showMessages;
|
||||||
|
bool m_showStatistics;
|
||||||
bool m_drawGpuZones;
|
bool m_drawGpuZones;
|
||||||
bool m_drawZones;
|
bool m_drawZones;
|
||||||
bool m_drawLocks;
|
bool m_drawLocks;
|
||||||
|
Loading…
Reference in New Issue
Block a user