
A performance monitor that computes the average time for a process. Defines a monitor for measuring the time for the HTTP responses, session duration, and so on.
For example, if N and T are the total number of responses and the total response time respectively, the values under the last measurement node are calculated as follows:
number of requests = Ni - Ni-1
average time = Ti - Ti-1 / Ni - Ni-1 or 0 if Ni = Ni-1
There are two ways of instrumenting the duration monitor: in the monitor-configuration.xml and in the source code:
<duration-monitor name="Commit Duration" configuration-group="ConfigMgr.CommitDuration"> <monitored-resource name="ConfigurationManager" type="MANAGER"/> <duration-attribute-mapping> <total-number-attribute> <observed-resource-attribute name="AccNrOfCommits"/> </total-number-attribute> <total-time-attribute> <observed-resource-attribute name="AccCommitTime"/> </total-time-attribute> </duration-attribute-mapping> </duration-monitor>
public long getAccNrOfCommits();
In this example, the accumulated number of commit-requests since the server startup is returned.
public long getAccCommitTime();
In this example, the accumulated time (in milliseconds) of processing all commit-requests since the server startup is returned.
<duration-monitor name="Commit Duration" configuration-group="ConfigMgr.CommitDuration"> <monitored-resource name="ConfigurationManager" type="MANAGER"/> <duration-attribute-mapping> <duration-attribute> <observed-resource-attribute name="DurationValue "/> </duration-attribute> </duration-attribute-mapping> </duration-monitor>
public com.sap.jmx.monitoring.api.DurationValue getDurationValue();