14 #ifndef __UT_OldPerformance__
15 #define __UT_OldPerformance__
52 int type,
void *
data,
const char *msg,
int refresh);
68 void startEvent(
int thread,
73 fpreal stopEvent(
int thread,
bool log =
true);
76 void logAccumulatedTime(
int thread,
fpreal time_ms);
80 void logMessage(
const char *m,
int refresh = 1,
82 const utPerfEvent *
event = 0);
90 frameComplete(myLastFrame);
95 {
return myLogEnable && myLogType; }
100 (myOpInfo || myOpHighlight ||
101 (myLogEnable && myLogType && myLogCookTime));
106 return logEnabled() && myLogFLength;
122 void frameChange(
fpreal frame);
125 void frameStart(
fpreal frame);
126 void frameComplete(
fpreal frame);
137 void opInfo(
int yesno) { myOpInfo = yesno; }
148 void startMemoryLog();
149 void stopMemoryLog(
const char *
label);
158 void logType(
int type);
159 void logPause(
int yesno);
160 void logSorted(
int yesno);
166 {
return logEnabled() && myLogCookTime; }
168 { myLogCookTime = yesno; }
171 {
return logEnabled() && myLogSolveTime; }
173 { myLogSolveTime = enable; }
176 {
return logEnabled() && myLogLongCHOPs; }
178 { myLogLongCHOPs = yesno; }
181 {
return logEnabled() && myLogObjectViewTime; }
183 { myLogObjectViewTime = yesno; }
186 {
return logEnabled() && myLogViewPortTime; }
188 { myLogViewPortTime = yesno; }
191 {
return logEnabled() && myLogFLength; }
193 { myLogFLength = yesno; }
196 {
return logEnabled() && myLogMemory; }
198 { myLogMemory = yesno; }
201 {
return logEnabled() && myLogErrors; }
203 { myLogErrors = yesno; }
206 { myFrameCount = 0; myFrameTotal = 0.0; }
216 const char *suffix =
"\n\r",
227 void logFrameAverage();
228 void clearAccumTime();
229 void startFrame(
fpreal frame);
230 void endFrame(
fpreal dtime);
237 unsigned int myLogEnable : 1,
246 myLogViewPortTime : 1,
247 myLogObjectViewTime : 1,
253 void appendMessage(
const char *m,
fpreal dtime,
254 const utPerfEvent *
event);
256 void clearMessages();
257 void flushMessages();
271 size_t myMemoryUsage;
283 int myFilterHiddenEvents;
struct timeval SYS_TimeVal
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei const GLchar * label
GLint GLint GLsizei GLint GLenum format
GLuint const GLchar * name
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
OIIO_FORCEINLINE T log(const T &v)
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter