Skip to content

Commit

Permalink
Export start_sampling_mode as variant with and without interval par…
Browse files Browse the repository at this point in the history
…ameter.
  • Loading branch information
Neloreck committed Jan 19, 2025
1 parent ecedffc commit 4e4558f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/xrScriptEngine/ScriptEngineScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ SCRIPT_EXPORT(CScriptEngine, (),
{
GEnv.ScriptEngine->m_profiler->startHookMode();
}),
def("start_sampling_mode", +[]()
{
GEnv.ScriptEngine->m_profiler->startSamplingMode();
}),
def("start_sampling_mode", +[](u32 sampling_interval = CScriptProfiler::PROFILE_SAMPLING_INTERVAL_DEFAULT)
{
GEnv.ScriptEngine->m_profiler->startSamplingMode(sampling_interval);
Expand Down
2 changes: 1 addition & 1 deletion src/xrScriptEngine/script_profiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class XRSCRIPTENGINE_API CScriptProfiler

void start(CScriptProfilerType profiler_type = PROFILE_TYPE_DEFAULT);
void startHookMode();
void startSamplingMode(u32 sampling_interval);
void startSamplingMode(u32 sampling_interval = PROFILE_SAMPLING_INTERVAL_DEFAULT);
void stop();
void reset();
void logReport(u32 entries_limit = PROFILE_ENTRIES_LOG_LIMIT_DEFAULT);
Expand Down

0 comments on commit 4e4558f

Please sign in to comment.