mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Add instrumentation statistics achievement.
This commit is contained in:
parent
f04d844515
commit
c5c0fceda4
@ -22,6 +22,16 @@ AchievementItem* ac_samplingItems[] = { &ai_samplingIntro, nullptr };
|
||||
AchievementCategory ac_sampling = { "sampling", "Sampling", ac_samplingItems };
|
||||
|
||||
|
||||
AchievementItem ai_instrumentationStatistics = { "instrumentationStatistics", "Show me the stats!", [](const ctx& c){
|
||||
ImGui::TextWrapped( "Once you have instrumented your application, you can view the statistics for each zone in the timeline. This allows you to see how much time is spent in each zone and how many times it is called." );
|
||||
ImGui::TextWrapped( "To view the statistics, click on the '" ICON_FA_ARROW_UP_WIDE_SHORT " Statistics' button on the top bar. This will open a new window with a list of all zones in the trace." );
|
||||
} };
|
||||
|
||||
AchievementItem* ac_instrumentationIntroItems[] = {
|
||||
&ai_instrumentationStatistics,
|
||||
nullptr
|
||||
};
|
||||
|
||||
AchievementItem ai_instrumentationIntro = { "instrumentationIntro", "Instrumentating your application", [](const ctx& c){
|
||||
constexpr const char* src = R"(#include "Tracy.hpp"
|
||||
|
||||
@ -47,7 +57,7 @@ void SomeFunction()
|
||||
ImGui::TextWrapped( "The above description applies to C++ code, but things are done similarly in other programming languages. Refer to the documentation for your language for more information." );
|
||||
ImGui::PopStyleColor();
|
||||
ImGui::PopFont();
|
||||
} };
|
||||
}, ac_instrumentationIntroItems };
|
||||
|
||||
AchievementItem* ac_instrumentationItems[] = { &ai_instrumentationIntro, nullptr };
|
||||
AchievementCategory ac_instrumentation = { "instrumentation", "Instrumentation", ac_instrumentationItems };
|
||||
|
@ -51,6 +51,8 @@ void View::DrawStatistics()
|
||||
return;
|
||||
}
|
||||
|
||||
Achieve( "instrumentationStatistics" );
|
||||
|
||||
ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 2, 2 ) );
|
||||
ImGui::RadioButton( ICON_FA_SYRINGE " Instrumentation", &m_statMode, 0 );
|
||||
if( m_worker.AreCallstackSamplesReady() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user