Dumps performance statistics tables to a character array.
Syntax
ESS_FUNC_M EssDumpPerfStats (hCtx, pStatBuf, [thdSN])
Parameter | Data Type | Description |
---|---|---|
hCtx; | ESS_HCTX_T | API context handle (input) |
pStatBuf; | ESS_STR_T | Pointer to the address where performance statistics tables will be dumped (input) |
thdSN; | ESS_INT_T | Optional. Thread serial number from which to dump statistics (input). Default is 0 (all threads are dumped). |
Notes
Before you call EssDumpPerfStats(), call EssGetStatBufSize() to ascertain how much memory to allocate for the performance statistics tables at the address pointed to by pStatBuf.
Return Value
If successful, EssDumpPerfStats()
Returns 0.
Dumps performance statistics tables to a character array that begins at the address pointed to by pStatBuf.
The caller of EssDumpPerfStats() is responsible for allocating and freeing memory at the address pointed to by pStatBuf.
For more information on performance statistics tables, see the Oracle Essbase Technical Reference.
Access
The caller of this function must have supervisor access.
Example
/* This function gets the array of performance stats */ ESS_STS_T ESSGetPerfStats(ESS_HCTX_T *context) { ESS_STS_T sts; ESS_ULONG_T bufsize; ESS_PUCHAR_T poutarray; /* Pointer to the stats staging area */ /* Get the size of the output buffer */ if(sts = EssGetStatBufSize(context, &bufsize)) return(sts); if(bufsize) { /* Allocate a staging area */ (ESS_PVOID_T)(poutarray) = malloc (bufsize); /* Fill the staging area */ sts = EssDumpPerfStats(context, poutarray); if(sts) return(sts); /* Do something useful with the stats here */ /* ....................................... */ /* Free the staging area */ sts = EssFree(context, poutarray); if(sts) return(sts); } else { printf("Performance Statistics not enabled, call ResetPerfStats()\n"); } return(ESS_STS_NOERR); }
See Also