mirror of
https://github.com/wolfpld/tracy.git
synced 2026-11-07 08:25:26 +00:00
Add a timeline navigation achievement.
This commit is contained in:
@@ -4304,6 +4304,7 @@ When memory profiling (section~\ref{memoryprofiling}) is enabled, Tracy will aut
|
||||
Another plot that Tracy automatically provides is the \emph{\faGaugeHigh{}~CPU usage} plot, which represents the total system CPU usage percentage (it is not limited to the profiled application).
|
||||
|
||||
\subsubsection{Navigating the view}
|
||||
\label{navigatingview}
|
||||
|
||||
Hovering the \faArrowPointer{} mouse pointer over the timeline view will display a vertical line that you can use to line up events in multiple threads visually. Dragging the \LMB{}~left mouse button will display the time measurement of the selected region.
|
||||
|
||||
|
||||
@@ -238,6 +238,7 @@ Embed(PROFILER_FILES TextManual src/achievements/Manual.md TEXT)
|
||||
Embed(PROFILER_FILES TextMemory src/achievements/Memory.md TEXT)
|
||||
Embed(PROFILER_FILES TextMemoryPools src/achievements/MemoryPools.md TEXT)
|
||||
Embed(PROFILER_FILES TextNameThreads src/achievements/NameThreads.md TEXT)
|
||||
Embed(PROFILER_FILES TextNavigate src/achievements/Navigate.md TEXT)
|
||||
Embed(PROFILER_FILES TextLightFlame src/achievements/LightFlame.md TEXT)
|
||||
Embed(PROFILER_FILES TextPlots src/achievements/Plots.md TEXT)
|
||||
Embed(PROFILER_FILES TextReadSource src/achievements/ReadSource.md TEXT)
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Navigating the view
|
||||
|
||||
The capture may run for minutes, but the trouble you are looking for is over in microseconds. The mouse wheel can cross that gap, but only a little per scroll. The [navigation gestures](#navigatingview) are much faster.
|
||||
|
||||
1. To zoom into a region, drag the middle mouse button over it and release: the view jumps to the range you selected.
|
||||
2. To zoom out, hold Ctrl and drag across a range: the current view collapses into the selected range.
|
||||
3. To pan, drag the right mouse button. Panning works in both directions: sideways through time, vertically through the thread lanes.
|
||||
4. To keep your hands on the keyboard, use A and D to scroll, W and S to zoom.
|
||||
|
||||
The time ruler above the timeline shows the exact time under the cursor.
|
||||
|
||||
When you zoom far out, zones thinner than a pixel are drawn with a zigzag fill. One zigzag bar can be many short zones, and you only find out by zooming in.
|
||||
|
||||
Now drag the middle mouse button over any stretch of your capture and watch it fill the screen. Try it out!
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "data/TextMemory.hpp"
|
||||
#include "data/TextMemoryPools.hpp"
|
||||
#include "data/TextNameThreads.hpp"
|
||||
#include "data/TextNavigate.hpp"
|
||||
#include "data/TextPlots.hpp"
|
||||
#include "data/TextReadAssembly.hpp"
|
||||
#include "data/TextReadSource.hpp"
|
||||
@@ -370,11 +371,18 @@ AchievementItem ai_nameThreads = {
|
||||
.text = Unpack( TextNameThreads )
|
||||
};
|
||||
|
||||
AchievementItem ai_navigate = {
|
||||
.id = "navigate",
|
||||
.name = "Navigating the view",
|
||||
.text = Unpack( TextNavigate )
|
||||
};
|
||||
|
||||
AchievementItem* ac_connectToServerItems[] = {
|
||||
&ai_saveTrace,
|
||||
&ai_loadTrace,
|
||||
&ai_appInfo,
|
||||
&ai_nameThreads,
|
||||
&ai_navigate,
|
||||
nullptr
|
||||
};
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ void View::HandleTimelineMouse( int64_t timespan, const ImVec2& wpos, float w )
|
||||
const auto s = std::min( m_highlightZoom.start, m_highlightZoom.end );
|
||||
const auto e = std::max( m_highlightZoom.start, m_highlightZoom.end );
|
||||
|
||||
if( s_config.achievements ) Achieve( "navigate" );
|
||||
|
||||
// ZoomToRange disables m_highlightZoom.active
|
||||
if( io.KeyCtrl )
|
||||
{
|
||||
@@ -227,6 +229,7 @@ void View::HandleTimelineKeyboard( int64_t timespan, const ImVec2& wpos, float w
|
||||
|
||||
if( anyDeltaApplied )
|
||||
{
|
||||
if( s_config.achievements ) Achieve( "navigate" );
|
||||
if( m_viewMode == ViewMode::LastFrames ) m_viewMode = ViewMode::LastRange;
|
||||
if( nextTimelineRangeStart > nextTimelineRangeEnd ) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user