Access performance libraries for tracing or collecting key performance indicators (KPIs).
User interactions are measured in intervals of these types: HttpRequest, PersistenceRead, PersistenceWrite, SubmitPending, CancelPending, and Transaction. All intervals measure Wallclock Time, CPU Time, and Memory Max.
The HttpRequest interval type measures some additional KPIs:
After the interaction is stopped, a summary log in txt format is written to the device.The summary log contains sums of each of the KPI types. For example, total Wallclock Time, total CPU Time, total number of roundTrips, and so on. There is no detailed log that contains KPI values for each interval.
The administrator can invoke a Get Trace request through Sybase Control Center to send the performance log to the server domain log.
To start collecting performance metrics, call the startInteraction method:
- (void)startInteraction:(NSString *)interactionName;
To stop collecting performance metrics and output a summary to the reporting target, call the stopInteraction method:
- (void)stopInteraction;
Example of application interactions for collecting KPI:
// get the instance id <SUPPerformanceAgentService> pa = [SUPPerfAgentServiceImpl getInstance]; [pa startInteraction:@"Interaction 1";]; // application interaction // ... // ... [pa stopInteraction]; [pa startInteraction:@"Interaction 2";]; // application interaction // ... // ... [pa stopInteraction];
The following limitations apply: