Profiling utilities for the Physics-Based Animation Toolkit (PBAT)
More...
#include "PhysicsBasedAnimationToolkitExport.h"
#include <map>
#include <string>
#include <string_view>
#include <type_traits>
Go to the source code of this file.
|
namespace | pbat |
| The main namespace of the library.
|
|
|
#define | PBAT_PROFILE_SCOPE |
|
#define | PBAT_PROFILE_NAMED_SCOPE(name) |
|
#define | PBAT_PROFILE_LOG(txt, size) |
|
#define | PBAT_PROFILE_SCOPED_LOG(txt, size) |
|
#define | PBAT_PROFILE_PLOT(name, value) |
|
Profiling utilities for the Physics-Based Animation Toolkit (PBAT)
- Author
- Quoc-Minh Ton-That (tonth.nosp@m.at.q.nosp@m.uocmi.nosp@m.nh@g.nosp@m.mail..nosp@m.com)
- Date
- 2025-02-10
- Copyright
- Copyright (c) 2025
◆ BeginFrame()
PBAT_API void pbat::profiling::BeginFrame |
( |
std::string_view | name | ) |
|
Begin a profiling frame with the given name.
- Precondition
- The frame name's length must not exceed 256 characters
- Parameters
-
◆ EndFrame()
PBAT_API void pbat::profiling::EndFrame |
( |
std::string_view | name | ) |
|
End the current profiling frame.
- Precondition
- The frame name's length must not exceed 256 characters
- Parameters
-
◆ IsConnectedToServer()
PBAT_API bool pbat::profiling::IsConnectedToServer |
( |
| ) |
|
Check if PBAT's Tracy client is connected to the Tracy profiler server.
- Returns
- true if connected, false otherwise
◆ Profile()
template<class Func, class... Args>
std::invoke_result_t< Func, Args... > pbat::profiling::Profile |
( |
std::string const & | zoneName, |
|
|
Func && | f, |
|
|
Args &&... | args ) |
Profile a function as a Tracy named zone.
- Template Parameters
-
Func | Type of the function to profile |
Args | Types of the arguments to the function |
- Parameters
-
zoneName | Name of the zone |
f | Function to profile |
args | Arguments to the function |
- Returns
- Result of the function
- Note
- This function is only available if the Tracy profiler is enabled