Skip to end of banner
Go to start of banner

Timer sensor

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Overview

The timer sensor types measure the execution time of methods within the monitored application. inspectIT provides different multiple realizations of the timer sensors. 

From inspectIT version 1.6.8 there is only a single realization of the timer sensor.

Configuration

Configuration using UI configuration interface

Using the UI configuration interface no configuration is required at all as method sensor types are activated automatically if a profile defines such sensor assignment. 

Configuration using configuration file(s)

method-sensor-type <name> info.novatec.inspectit.agent.sensor.method.averagetimer.AverageTimerSensor <priority>

priority can be one of MIN, LOW, NORMAL, HIGH, MAX. It is used to define the order of the sensor type execution if more than one method sensor type is defined for a single instrumented method. Usually you will select MAX as priority.

Generic timer factory

Apart from the "Average Timer", inspectIT provides a "Timer" sensor that was created to easily integrate different realizations of the same timer behaviour. Each implementation collects and/or stores the values in a different way, thus affecting system resources in a different manner. Switching between internal implementations is completely transparent to the user of inspectIT.

Example: The default implementation of the "timer" listens to the callbacks of the method hooks and calculates the time spent within the method. This information is directly aggregated within the sensor for all calls within this data collection interval. Thus data aggregation is done within the JVM of the application to be monitored. Another implementation of the "timer" does not calculate the average time within the sensor but sends raw data to the CMR. In this case the CMR will deal with aggregation of data. The information the user will see do not differ - in fact the user will not even be aware about which implementation will be used. It is completely transparent. Approach (a) will most likely use more CPU time than approach (b), but approach (b) will definitely sent much more data over the network.

Available Timer Realizations

The following modes are available for the timer sensor.

Timer mode

Description

Network

CPU

aggregate

aggregates the data before sending to minimize the network load, but will affect the application JVM

(tick)

(error)

optimized

reduces the memory usage as it calculates the results immediately when new measurements arrive

(error)

(tick)

raw

timer measurements are collected, but not aggregated. All data is sent to the CMR.

(error)

(error)

Configuration

Configuration using UI configuration interface

At the moment the UI configuration interface does not provide configuration option for selecting the timer realization.

Configuration using configuration file(s)

method-sensor-type <name> info.novatec.inspectit.agent.sensor.method.timer.TimerSensor <priority> mode=<optimized|aggregate|raw>

priority can be one of MIN, LOW, NORMAL, HIGH, MAX. It is used to define the order of the sensor type execution if more than one method sensor type is defined for a single instrumented method.

Comparison to the Average Timer

The Average Timer sensor type is basically the same as the Timer sensor type with a difference in the processing of the recorded data. The Timer sensor type is using a factory internally to select the storage mechanism based on the definition in the configuration. The Average Timer doesn't need this configuration and the aggregated mode in the Timer sensor type is the same as the one used in the Average Timer. Thus the difference is only that the additional abstraction is removed and the processing and storing of values should be a little bit faster.

Other options

String length

from version 1.3

This sensor enables the limitations of the string values collected. The timer sensor concretely can limit the maximum size of the strings collected as context parameters.

Configuration using UI configuration interface

The string length configuration for all sensors is available in the Environment configuration.

Configuration using configuration file(s)

The following definition will, for example, limit all the strings collected by the sensor to 500 characters:

String length option configuration
method-sensor-type <name> info.novatec.inspectit.agent.sensor.method.timer.TimerSensor <priority> mode=<optimized|aggregate|raw> stringLength=500

You can read more about string length limitations on Sensor type definition page.

  • No labels