14 #ifndef __UT_PerfMonStats__
15 #define __UT_PerfMonStats__
37 static const int UT_PERFMON_STAT_WALL_TIME = 0;
54 void setName(
const char *name);
57 void setIsDiff(
bool is_diff);
68 static void getRootStatName(
71 static void getSelfStatName(
72 const char *root_stat_name,
74 static void getCountStatName(
75 const char *root_stat_name,
77 static void getAverageStatName(
78 const char *root_stat_name,
80 static void getMinStatName(
81 const char *root_stat_name,
83 static void getMaxStatName(
84 const char *root_stat_name,
86 static void getDiffStatName(
87 const char *src_stat_name,
94 static void stripStatSuffix_(
95 const char *stat_name,
96 const char *stat_suffix,
113 const char* title1 = NULL,
114 const char* title2 = NULL);
116 const char *
name,
const char *
path,
const char *icon,
134 const char *
name()
const;
137 void setName(
const char *name);
140 const char *
path()
const;
143 void setPath(
const char *path);
146 const char *extraInfo()
const;
149 void setExtraInfo(
const char *extra_info);
159 const char *icon()
const;
162 void setIcon(
const char *icon);
167 bool isIconSet()
const;
187 bool hasStat(
const char *stat_name)
const;
198 const char *stat_name,
201 int thread_id = UT_PERFMON_STAT_WALL_TIME)
207 const char* stat_name,
208 int first_frame= UT_PERFORMANCE_INVALID_FRAME,
209 int last_frame = UT_PERFORMANCE_INVALID_FRAME)
const;
212 fpreal valueForThread(
const char *stat_name,
243 fpreal normalizedPercentage(
244 const char *time_stat_name,
253 void updateStatsFromDeltas();
260 static bool isArtificialStatObject(
const char *stat_obj_path);
264 static void convertToArtificialStatObjectName(
266 const char *stat_obj_name);
270 static void convertToRealStatObjectName(
275 static void buildObjectPath(
277 const char *real_object_path,
278 const char *artificial_object_name);
285 static void splitObjectPath(
293 static void splitParentPath(
299 static const char *rootStatsTitle();
302 static const char *unaccountedStatsTitle();
319 int frame_num,
fpreal delta_value)
323 frameNum = frame_num;
324 deltaValue = delta_value;
327 ut_StatDelta(
const ut_StatDelta &src)
329 statDef = src.statDef ?
332 threadId = src.threadId;
333 frameNum = src.frameNum;
334 deltaValue = src.deltaValue;
350 int thread_id,
int frame,
361 void updateStatsFromTimeDelta_(
362 const ut_StatDelta *delta,
363 const char *total_time_stat_name,
364 const char *total_self_time_stat_name,
370 void updateStatsFromMemoryDelta_(
371 const ut_StatDelta *delta,
376 void updateAverageTimeStats_(
382 void updateParentMaxChildStats_(
390 void updateMaxChildStat_(
392 fpreal suggested_max_value);
UT_ValArray< UT_PerfMonStats * > UT_PerfMonStatsList
UT_ValArray< UT_PerfMonStatDefinition * > UT_PerfMonStatDefinitions
OIIO_UTIL_API std::string parent_path(string_view filepath) noexcept
GLsizei const GLfloat * value
GLsizei const GLchar *const * path
Definition of a collected statistic.
Class which writes ASCII or binary JSON streams.
**But if you need a result
__hostdev__ void setValue(uint32_t offset, bool v)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
UT_PerfMonObjectType
Object types.
std::string OIIO_UTIL_API replace(string_view str, string_view pattern, string_view replacement, bool global=false)
UT_PerfMonCategory
Categories.
UT_StringMap< fpreal > UT_PerfMonMaxStatValues
GT_API const UT_StringHolder object_name
GLuint const GLchar * name
A collection of statistics for a particular object (i.e. node, viewport).
LeafData & operator=(const LeafData &)=delete
UT_ValArray< const UT_PerfMonStats * > UT_ConstPerfMonStatsList
const UT_StringHolder & name() const
**Note that the tasks the thread_id