RTL_LOGFILE is a developer feature of OpenOffice.org that can be used to get wall clock based time stamps for particular code points. It can be used for instance in automated performance tests. This section describes its use for profiling load and save operations of ODF documents.
The use of RTL_LOGFILE is advantageous, compared to for instance the use of a profiler, if the performance data is required for a large amount of load or save operations, or if the performance of two OpenOffice.org builds shall be compared with as little effort as possible. The data that can be collected by RTL_LOGFILE is neither precise nor detailed enough to actually profile for instance the loading or saving a particular document, but it is still is detailed and precise enough for a rough analysis, for regression tests or performance metrics, or to figure out which effect a particular performance improvement has for a large set of data.
Possible use cases are:
- The comparison of load save times for a large set of document between a master build and a CWS.
- The comparison of load save times for a large set of document between a master build and a developer build that implements a particular improvement.
- To provide metrics that show performance improvements that have been achieved.
- To find documents whose load or save time is significant above or below the average, and which therefore are either
- worth a deeper investigation (with other tools), or
- appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.
In order to use RTL_LOGFILE as described above, two tasks need to be completed:
- Additional RTL_LOGFILE macros have to be inserted into the OpenOffice.org source code that provide the information which documents have been loaded or saved.
- A configurable analysis tool is required that allows comparisons between load/save data for individual documents, and between load/save data for individual OpenOffice.org instances.
Both implementations are in progress.
RTL_LOGFILE Analysis Tool
The new analysis tool is similar to the existing RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL_LOGILEs as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of XPath expressions.
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL_LOGFILE is converted into an XML tree. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the detailed conversion, a set of sheets is created, there each for instance contains the data that belongs to a thread, or to a single load or save operation. In the summarized conversion, a single sheet is created that for each load or save operation contains a set of columns with start times and durations.