The Framework Measurement module provides a universal model for measuring important runtime parameters, such as startup time, used memory and count of active threads, of bundles as well as of the framework itself.
The framework loads the Framework Measurement module only if one of the system properties for turning measuring on is true.
Contents:
Basically, the Framework Measurement module supports two ways of measurement:
Framework Measurement is represented by the com.prosyst.mbs.framework.measurement.FrameworkMeasurement interface.
ProSyst provides two implementations of the Framework Measurement module - default and native.
Default Framework Measurement prints the results to the standard output. It is able to perform memory measurements – presently only used heap memory measurements. It also provides information about the number of active threads, and performs periodic memory measurements (see "Periodic Memory Measurement").
Native Framework Measurement sends the measurements to a native agent, which measures some parameters on OS native level. In addition to the heap memory measurements, that Default Framework Measurement is capable to perform, the native agent is able to measure framework process memory and flash memory.
Native Framework Measurement provides information about the number of the active threads and performs periodic memory measurements similarly to Default Framework Measurement.
The parameters that the Native Framework Measurement will check are specified by means of system properties as described in "Configuring Measured Parameters and Their Display".
To successfully make the framework use the Native Framework Measurement:
mbs.measurements.class system property to com.prosyst.mbs.impl.framework.module.measurement.NativeFrameworkMeasurementImpl in the command line or in the JVM-specific framework starting script located in the bin/vms/<vm_name> directory.The OSGi Logger is a native implementation of the Framework Measurement module for Series 80 devices like Nokia 9500 Communicator. The OSGi Logger application launches an mBS image on the Series 80 device and then displays the logged measurements on the device screen.
Note that the OSGi Logger cannot be used on the Series 80 SDK.
Prerequisites: First of all, to be able to use the OSGi Logger, you have to transfer on the device the mBS image whose performance parameters will be measured (see "Deployment on Symbian Devices"). Note that the mBS image should have at least the following system properties configured in the .j9 launch script:
mbs.measurements.class should be set to com.prosyst.mbs.impl.framework.module.measurement.NativeFrameworkMeasurementImplmbs.measurements.full should be set to trueFor more information about the measurement system properties, refer to the "Setup" section and the "System Properties" document.
The OSGi Logger application consists of the following components:
Basically to deploy the OSGi Logger on the Series 80 device, you have to do the following:
|
| LOG-FILE=C:\osgi\log.txt DIRECTORY=C:\osgi\bin\vms\j9\storage J9-SCRIPT=C:\osgi\bin\vms\j9\server.j9 |
Tip: For convenience, you can create a .sis installation file for installing the OSGi Logger application to the device.
After the OSGi Logger is placed on the device, the OSGiLogger shortcut appears on application desk.
Tip: If the OSGi Logger has been deployed on the device by simply copying its components, restart the device to have the OSGiLogger shortcut displayed on the application desk.
Use the OSGiLogger shortcut to start the measurement process. The content of the measurement log is displayed on the screen. To save it, press the Save command button. To scroll the content, use Up and Down. To exit the logger, use the Exit command button.
The Framework Measurement implementations accept a number of system properties related to the parameters they measure. For more information about measurement system properties, refer to the "System Properties" document.
If you want to develop a custom implementation of the Framework Measurement module, implement the interface, add the implementation class file to the classpath and set the mbs.measurements.class system property to the name of the implementation class.
Tip: Most common measurement types, that can be implemented in the trigger method, are provided as FrameworkMeasurement fields and can be optionally configured as system properties.
Both implementations of the Framework Measurement module start a thread, which periodically triggers measurement of consumed memory. The measurement period in minutes can be configured with the mbs.measurements.period system property. The default period is 10 minutes.
The operation of the Framework Measurement module in the framework can be configured by a number of system properties. These system properties must be specified in the command line or in the framework starting script as the framework loads the module prior to reading the content of its properties file (i.e. default.prs by default).
The framework loads the Framework Measurement module only if one of the following system properties is set to true in the command line or in the framework starting script:
mbs.measurements.fullmbs.measurements.setupmbs.measurements.intermediateFor more information about the full collection of measurement system properties, refer to the "System Properties" document.