SAP Screen Personas
Create: Sebastian Steinhauer Mar 17, 2016 14:37
Last Update: Regina Sheynblat Feb 06, 2019 21:42
Measuring TIME IN TRANSACTION
SAP SCREEN PERSONAS KNOWLEDGE BASE - by Regina Sheynblat , Sebastian Steinhauer
In order to evaluate the impact of an SAP Screen Personas project compared to the unchanged transaction a common generic metric is time in transaction. This can be achieved by instrumenting the actual flavor, and recording the start time of the flavor, as well as the end time of the process. The difference between these values gives an easily understandable metric: time in transaction.
Please note that this approach is due to an issue with session.utils.logMeasurement currently only supported in SAP GUI for HTML. Please check the section below on "Existing limitation with SAP GUI for Windows 7.40" for an suggested workaround.
This article will outline how the required measurements can be take and recorded. It will also outline how a simple flavor can be used to facilitate time in transaction measurements without distributing the instrumentation code across the system.
Leverage a Flavor to measure time to execute transaction.
In order to log data against a customer defined measuring point (in /personas/analytics) SAP Screen Personas 3.0 SP02 introduced a specific API. In order to log time in transaction 2 actions need to happen. First the start time and additional meta data needs to be logged to the session memory:
Afterward the usual process steps in question should be executed.
Once the process steps are concluded, the end time needs to be recorded and the time logged to the backend:
Measuring performance of the Original Screen
The approach outlined above is limited to performance measurements of flavors, as it leverage the SAP Screen Personas flavor itself to record the elapsed time. While convenient for these cases it does not allow to measure performance of the Original Screen. In order to facilitate such a control group the proposed solution is to develop a flavor for the SAP Access Menu transaction SMEN which will start and stop the timer, and either launch a transaction with or without a flavor. This approach allows to contain all the performance measurement code in a single transaction. However, it requires that all transactions return to SMEN on conclusion in order to record the time.
In case of a flavor the above code snipped could also be re-used in the flavor and tied to an appropriate action.
Overall the central measurement flavor should include the following sample coding to be executed on load:
A start of a transaction with a flavor can be triggered like this:
While a start of a transaction without a flavor is slightly more complex as it needs to manually for a flavor change to no flavor (Original View) before starting the timer and execution of the transaction:
A sample flavor including the above functionality can look like this:
Limitations of the approach and further options
This timing method is very basic, and limited to end-to-end time, measured in ms by the JS engine. It does not consider threading, client CPU or network load, processor interrupts, network effects, work process assignments, and co-habitation issues. However, these effects have empirically been observed to be minimal compared to fluctuation due to manual user interaction with the system.
Should the results of this first level of examination be inconclusive of not meeting expectations a more detailed analysis could measure number and time of request per dialog step. Specifically the number and duration of requests to /sap/bc/personas (for script execution) and /sap/bc/personas3 (images and other SAP Screen Personas specific resources) should be recorded. This should help either identify scripts that might require additional tweaking or resources that should be reduced in since.
Existing limitation with SAP GUI for Windows 7.40
Due to a mismatch between SAP GUI for Windows and SAP Screen Personas in certain configurations it can happen that session.utils.logMeasurement is not recording the measurements correctly into the measuring point. However it is possible to log the data leveraging a custom RFC.
Here is an example for such a RFC:
This RFC stores the data in the same structures and it can be accessed through standard SAP Screen Personas features. However this sample coding is provided without warranty or support by SAP.
The RFC can be called from the script as outlined here:
You can download the above sample flavor here: http://file.personas.help/uploads/145824454369731.zip
SAP Screen Personas, Analytics, log measure, SP02