Performance Monitoring

This function enables runtimes to be recorded in the user interface and the data to be persisted for further evaluation. The performance measurement values and information are displayed using a BPC monitor.

General

Standardized performance measurement functions are available for measuring and monitoring the performance of a BPC-based application. These record various evaluable parameters when performance measurement is activated. These functions can also be used in self-developed function modules via the integration of a corresponding API.

Enable/disable

No performance data is recorded by default. To enable this function, the following must be set in the Core Service Parameters the setting performanceTracing must be activated.

Clean up

The performance data is written to the OpenSearch index with the alias bpc-performance. Old data is periodically deleted so that it does not grow indefinitely. The frequency and retention period can be adjusted in the configuration file [karaf]/etc/de.virtimo.bpc.core.cfg (a Core Bundle restart is then required).

These are the default settings:

de.virtimo.bpc.core.cfg
# Alle 60 Minuten werden die Daten gelöscht welche älter als 4 Wochen sind
de.virtimo.bpc.core.performance.cleanupPeriodInMinutes=60
de.virtimo.bpc.core.performance.deleteEntriesOlderThan=4 weeks ago

Display of performance information

The performance information can be viewed in the administration area, see Performance Monitor.

It is also possible to create the AuditLog as a monitor module and make it available in the navigation bar.

Performance Monitor view

Interface (API)

The API provides functions for marking certain points on the time axis. Two points can then be used for a measurement (time difference between the two points). The API takes care of collecting the individual measurements and persisting the measurements.

This generally results in the following procedure:

  1. Marking the start time

  2. Executing the application

  3. Marking the end time

  4. Creating a measurement based on the two markers

Whereby the API offers the option of bundling the last two points in one call.

The API is offered by the BPC frontend at BpcCommon.performance.

Marking a time

When marking a time, an ID must always be specified that identifies this time.
The call looks like this:

BpcCommon.Performance.mark(ID);

//Beispiel
BpcCommon.Performance.mark("PSI_LOAD_BUSINESSPARTNER_FORM_START");
(...)
BpcCommon.Performance.mark("PSI_LOAD_BUSINESSPARTNER_FORM_END");

Please note that an existing marker is overwritten if the same ID is used.

Creating a measurement

Two markers are specified to create a measurement. A separate identifier is also defined for the measurement.
The call looks like this:

BpcCommon.Performance.measure(BEZEICHNER, START_MARKIERUNGS_ID, END_MARKIERUNGS_ID);

//Beispiel
BpcCommon.Performance.measure("PSI_LOAD_BUSINESSPARTNER_FORM","PSI_LOAD_BUSINESSPARTNER_FORM_START","PSI_LOAD_BUSINESSPARTNER_FORM_END");

In contrast to markers, a repeated call does not result in existing measurements being lost.

Combination of end marker and measurement

Since a measurement is usually also created when the end time is marked, the following combined call can also be used:

BpcCommon.Performance.markAndMeasure(BEZEICHNER, START_MARKIERUNGS_ID, END_MARKIERUNGS_ID);

//Beispiel
BpcCommon.Performance.markAndMeasure("PSI_LOAD_BUSINESSPARTNER_FORM","PSI_LOAD_BUSINESSPARTNER_FORM_START","PSI_LOAD_BUSINESSPARTNER_FORM_END");

This call automatically creates the end time marker and generates the measurement.

Persistence

The BPC takes care of the persistence of the recorded data independently. In order to generate as little overhead as possible and not to hinder the actual application, the BPC automatically creates the end time marker. the actual application, the data is buffered and sent to the backend in blocks. This means that measurements are lost after the last time they are sent to the backend when the browser is closed.

The backend provides a REST Service that records the information and stores it in OpenSearch. The following information is recorded for each measurement:

  • ID of the measurement

  • Start time

  • Duration

  • USER_AGENT 1)

  • ID of the browser session 2)

1) USER_AGENT HTTP header - contains information about the browser and operating system.
2) Does not correspond to the session. By opening a new browser window or tab, another browser session is created when an existing session is reused.


Keywords: