ug4
Lua Utility Scripts

Helpers for profiling output. More...

Functions

function util GetProfiles_MaxTotalTimes (profNames)
 
function util PrintProfile_MaxTotalTime (nodeName)
 
function util PrintProfile_TotalTime (nodeName)
 
function util PrintProfiles_MaxTotalTimes (profNames)
 

Detailed Description

Helpers for profiling output.

Function Documentation

◆ GetProfiles_MaxTotalTimes()

function util GetProfiles_MaxTotalTimes ( profNames  )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / profiler_util.lua :112-140

◆ PrintProfile_MaxTotalTime()

function util PrintProfile_MaxTotalTime ( nodeName  )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / profiler_util.lua :59-72

function util.PrintProfile_MaxTotalTime(nodeName)
if(GetProfilerAvailable() == true) then
local rawName = string.gsub(nodeName, "^%s*(.-)%s*$", "%1")
local pn = GetProfileNode(rawName)
local t = 0
if(pn:is_valid() == true) then
t = pn:get_avg_total_time_ms() / 1000
end
t = ParallelMax(t)
print(nodeName .. " " .. t .. " s")
else
print(nodeName .. " ---")
end
end
static T ParallelMax(T t)
Definition: pcl_bridge.cpp:79
function table print(data, style)
int local(bglp_vertex_descriptor p)
Definition: parallel_matrix.h:57
bool GetProfilerAvailable()
Definition: profile_node.cpp:1053
const UGProfileNode * GetProfileNode(const char *name)
Definition: profile_node.cpp:1033

◆ PrintProfile_TotalTime()

function util PrintProfile_TotalTime ( nodeName  )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / profiler_util.lua :43-53

function util.PrintProfile_TotalTime(nodeName)
if(GetProfilerAvailable() == true) then
rawName = string.gsub(nodeName, "^%s*(.-)%s*$", "%1")
pn = GetProfileNode(rawName)
if(pn:is_valid() == true) then
print(nodeName .. " " .. pn:get_avg_total_time_ms() / 1000 .. " s")
return
end
end
print(nodeName .. " ---")
end

References ug::GetProfilerAvailable(), ug::detail::local(), name, and profile.

◆ PrintProfiles_MaxTotalTimes()

function util PrintProfiles_MaxTotalTimes ( profNames  )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / profiler_util.lua :79-102