Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This chapter provides examples of sensor assignment configuration.

Instrumentation Configuration

Description

Image Added

A sensor of the type Image AddedTimer sensor is defined on the method msg with the parameter java.lang.String of the class novatec.SubTest.

Image Added

Image AddedTimer sensor is added to the method msg with the parameter type int for all classes that match the class expression novatec.Sub* which will hold true for novatec.Sub andnovatec.Sub2 but also for novatec.Sub.some.other.package.SomeClass.

Image Added

Image AddedTimer sensor is added to the method msg with a parameter type matching the expression *String of the class novatec.SubTest. So the method msg(java.lang.String) and the method msg(my.own.String) and msg(my.own.SuperString) will be instrumented.

Image Added

This example shows different usages of wild-card.

Image Added

This example shows how to instrument classes based on their status that they implement some interface. So this test will instrument all methods of all classes that implement the interface novatec.ITest.

Image Added

A sensor is defined on methods that start with the character m and have exactly one parameter whose type match the expression *String of all classes that extend a class matching the classpattern nova*.Te*. (quite powerful isn't it :))

Image Added

A Image AddedTimer sensor that starts invocation is defined on novatec.SubTest class on msg(int) method. The interesting part here is the minduration definition, which is specified so that all invocations taking less than 10 ms will be discarded.

Image Added

Instruments all public methods which name starts with 'do' in classes that implement the novatec.ITest interface

Image Added

Instruments all public methods in classes that have been annotated with novatec.annotation.ClassAnnotation and are in package novatec.*

Image Added

This sensor instruments all constructors of the class novatec.SubTest

Image Added

A specific constructor is instrumented here: The method signature has to contain one single parameter of type java.lang.String.

Image Added

Instruments all constructors in novatec.SubTest class that have been annotated with novatec.annotation.DefaultConstructor