CX_PROFILE_MANAGER
Class hierarchy
- CX_CLASS
- CX_SYSTEM_MANAGER
- CX_PROFILE_MANAGER
- CX_SYSTEM_MANAGER
Description:
The Profile Manager controls profiling, i.e. the measurement of the time of individual commands, database operations, etc. Up to version 4.1, the InstantView® Profile command was responsible for this.
A Profile Manager object is able to display itself as a string and reflect the current profiling status. This is either OFF or lists all levels separated by commas.
Code example:
GetManager(PROFILE) // Profile-Manager-Objekt holen // Das Profile-Manager-Objekt befindet sich nun auf dem Stack String // Objekt als String darstellen => Status ermitteln (z.B. "OFF")
Detailed code example:
Var(filename, flags) "profile.xml" -> filename (-1) -> flags //-1 = 0xFFFFFFFF Profile everything filename GetManager(PROFILE) Put(FileName()) flags GetManager(PROFILE) Call(Start) //Start profiling // ... do stuff GetManager(PROFILE) Call(Stop) //Stop profiling and close file //Setup XML transformation rules CreateTransObject(CX_XML_PROCESSOR) -> xmlProcessor "statement" CX_IV_STATEMENT "@node,entryName,code,uniqueID,time,starttime" "subTransactions" "transaction" xmlProcessor Call(SetTransformRule) "define" CX_IV_MACRO "@node,entryName,name,uniqueID,time,starttime,module,module" "subTransactions" "transaction" xmlProcessor Call(SetTransformRule) "trace" CX_FUNCTION_TRACE "function,uniqueID,time,starttime" "subTransactions" "transaction" xmlProcessor Call(SetTransformRule) "traceinfo" CX_FUNCTION_TRACE "@contents,comment,time,starttime" "subTransactions" "transaction" xmlProcessor Call(SetTransformRule) "message" CX_IV_MESSAGE "@node,entryName,name,uniqueID,time,starttime,module,module" "subTransactions" "transaction" xmlProcessor Call(SetTransformRule) //Prepare root element Var(root) CreateTransObject(CX_PROFILING_SESSION) -> root 0.0 root Put(starttime) //set starttime for root element //Load tree from XML file filename root xmlProcessor Call(Parse) //Calculate durations root "subTransactions" "duration" GetManager(PROFILE) Call(CalculateDurations) //Display the structure in some tree widget ClearObox root FillObox
Function | MA* | Parameters | Return | Brief description |
---|---|---|---|---|
CalculateDurations | OBJECT, STRING, STRING | |||
DisableBufferedOutput | Switch the buffering of profile outputs on/off. | |||
FileName | * | Set and read out the file name of the log file | ||
FindHotspots | OBJECT, INTEGER |
| ||
FindIdleHotspots | OBJECT, INTEGER |
| ||
GetCounter | STRING | INTEGER | Reads a specific ObjectStore counter | |
ResetCounters | Resets all ObjectStore counters | |||
SetCountersEnabled | INTEGER (TRUE | FALSE) | Enables or disables the ObjectStore Counter | ||
Start | INTEGER | Start profiling | ||
Stop | End profiling |
* MA = Member Access function,
grey background = inherited function
Module | Brief description |
---|---|
profiling.mod | This module controls the profiling of any InstantView® code |