MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

Using sp-endurance-postproc

Sp-endurance-postproc provides post-processing tools for producing reports from the data collected by sp-endurance.

The provided tools include:

  • A script for producing an overview HTML report of the collected endurance data.
  • A script for splitting the data into several reports (in case of reboots during automated testing).
  • A script for parsing errors and other significant events from syslogs.
  • A script for generating graphs from endurance data.

Packages

source: sp-endurance

binary: sp-endurance-postproc

Installing sp-endurance-postproc on the Harmattan device

Prerequisite: Developer mode must be enabled.

  1. Select Settings > Security > Developer mode.
  2. Install the Resource usage analysis bundle package by clicking Install.
  3. You get a notification screen that lists all the applications to be installed in the bundle package. To install, click OK.
  4. A dependency notice appears. Click Accept.

For more information on developer mode and installable tools, see Activating developer mode.

Using the tool

Once you have transferred the endurance data saved by sp-endurance to a Harmattan device, you can install the post-processing tools. Enter the following command:

 # apt-get install sp-endurance-postproc

To post-process the endurance data, enter the following command:

 $ parse-endurance-measurements <test-case-name>/[0-9]*

This produces a single-file HTML report, which you can, for example, send by e-mail or attach to Bugzilla.

The report lists first the information about the initial state (first measurement data) of the system, the memory usage change overview, more detailed memory usage of each process whose memory usage changed, and the details about all resource usage changes and recognised syslogged errors between each of the measurements. Finally, there is a summary of the differences between the second and the last measurement.

You may want to get a report for only a subset of the measurements, for example, if there was a reboot between them or to see the leaks better. The script offers several options for generating reports for this purpose as well.

Parsing syslogs

As part of endurance data processing, the saved syslogs are parsed for errors and other significant events. However, you can also do that directly. Enter the following command:

 # syslog_parse.py syslog.gz

The syslog file can be compressed and you can get the lists either in ASCII (default) or in HTML.

Creating endurance graphs

Graphical representation of endurance data is useful for easy trend detection, which is useful for spotting resource leaks, abnormally high resource consumption, and other problems. To create endurance graphs, enter the following command:

 # endurance_plot <test-case-name>/[0-9]*

This produces a set of graphs and an index file with thumbnails for the graphs.

Further information

For more information on the tool, see the following links: