Building Reusable Monitors

Several approaches are available for defining the aspects of Silk Performer projects that are utilized in Performance Manager monitors.

Multiple Transactions

Multiple transactions can be defined in Silk Performer scripts. Transactions are associated with user groups. Silk Performer projects may contain multiple scripts.

In Performance Manager, when creating a new monitor, you select:
  • A script (this step is omitted if the project contains only one script)
  • A user group of the selected script (this step is omitted if the project contains only one user group)
  • One or more transactions of the selected user group. The begin and end transactions cannot be selected.

The begin transaction is executed when the monitor is initialized.

On each scheduled execution, all selected transactions are executed once, independent of the transaction count defined in the script (i.e., Performance Manager uses its own workload model and ignores the model specified in the Silk Performer project).

The advantage here is that you can maintain several monitor scripts in a single Silk Performer project, using a different script or user group for each monitor.

The differences between using several transactions in a single monitor and creating a monitor for each transaction are as follows.

Several transactions in a single monitor

One monitor for each transaction

All transactions use the same schedule

Each transaction can have its own schedule

All transactions use the same process

A process is created for each transaction

The transactions are executed sequentially

Depending on the schedule, the transactions can run in parallel

All transactions share the same global variables

Each transaction has its own set of variables

All transactions use the same profile

A different profile can be assigned to each transaction

All transactions use the same project attributes

Different project attributes can be assigned to each transaction

Profiles

Profiles can be used to control the behavior of monitors. After creation of a monitor, a profile may be selected from the list of defined profiles in Silk Performer. Of the settings defined in a profile, network bandwidth and browser type can be changed for client monitors while leaving the remaining settings of the profile unchanged. Also, the generation of output files (the writing of TrueLogs and the default output file) can be set to overrule the definition in the profile.

Note: Do not use a WebSetBrowser function call in the begin transaction, as this will override the setting defined in the Performance Manager GUI.

Project Attributes

The best way to build reusable monitors is through the use of project attributes. Project attributes give you the option of parameterizing your script. Project attributes consist of a set of variables that can be defined from outside of Silk Performer projects, thereby defining an interface.

In Silk Performer, project attributes are defined in the Project menu. When creating or editing a monitor in Performance Manager, a list of configurable project attributes is displayed. The default values set in Silk Performer are shown by default in Performance Manager as well. The monitor then reads the attributes into variables during runtime.

Using this mechanism, variables such as user names, passwords, and account numbers, as well as host names, ports, and so on, can be defined during monitor creation. It is possible to create several monitors that share the same Silk Performer project, but use different project attributes.

Timer Names

Timers (page timers, custom timers, etc.) are displayed in alphabetic order in Performance Manager reports. If you want to have timers sorted in a different order, for example, in order of sequence, you can rename the timers in the Silk Performer script so that an alphabetical sort order reflects the sort order that you want to see.

To sort page timers by sequence, rename your timers as follows:

"Start (http://…)" --> "01 - Start (http://…)"
"ExecuteLogin (form …)" --> "02 - ExecuteLogin (form …)"
"Page 1 (http://…)" --> "03 - Page 1 (http://…)"