<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mib</id>
	<title>Apache OpenOffice Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mib"/>
	<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/wiki/Special:Contributions/Mib"/>
	<updated>2026-05-05T08:51:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=ODFValidator&amp;diff=192892</id>
		<title>ODFValidator</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=ODFValidator&amp;diff=192892"/>
		<updated>2011-02-01T08:23:43Z</updated>

		<summary type="html">&lt;p&gt;Mib: Replaced content with &amp;#039;&amp;#039;&amp;#039;&amp;#039;Note: The ODF Validator has been [http://odftoolkit.openoffice.org moved] to the [http://odftoolkit.org ODF Toolkit Union]. The new project is located [http://odftoolkit.o…&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Note: The ODF Validator has been [http://odftoolkit.openoffice.org moved] to the [http://odftoolkit.org ODF Toolkit Union]. The new project is located [http://odftoolkit.org/projects/conformancetools/pages/ODFValidator here].&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:ODF]]&lt;br /&gt;
[[Category:ODFToolkit]]&lt;br /&gt;
[[Category:ODFToolkitTool]]&lt;br /&gt;
[[Category:Effort]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=ODFValidator&amp;diff=192891</id>
		<title>ODFValidator</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=ODFValidator&amp;diff=192891"/>
		<updated>2011-02-01T08:23:02Z</updated>

		<summary type="html">&lt;p&gt;Mib: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Note: This page is out of date. The ODF Validator has been [http://odftoolkit.openoffice.org moved] to the [http://odftoolkit.org ODF Toolkit Union]. The new project is located [http://odftoolkit.org/projects/conformancetools/pages/ODFValidator here].&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
ODFValidator is a tool that validates OpenDocument files and checks certain conformance criteria.&lt;br /&gt;
&lt;br /&gt;
ODFValidator is available as a [http://tools.odftoolkit.org/odfvalidator online service] and as a command line tool. This page primarily describes the command line tool. Please visit the [http://tools.odftoolkit.org/odfvalidator ODF Validator] web page for details regarding the online tool.&lt;br /&gt;
&lt;br /&gt;
== How to start ==&lt;br /&gt;
To use the ODFValidator, the following steps are required:&lt;br /&gt;
&lt;br /&gt;
* Check out the [[#NetBeans Project |&amp;#039;&amp;#039;&amp;#039;odfvalidator&amp;#039;&amp;#039;&amp;#039; NetBeans project]].&lt;br /&gt;
* Add the jar files listed under [[#Requirements|Requirements]] to the project&amp;#039;s libraries.&lt;br /&gt;
* Get the ODF 1.0, 1,1 and 1.2 [[#Where do I get the schemas?|schemas]], and add the directories where your local copies of the schemas are stored to the &amp;#039;&amp;#039;&amp;#039;schema.user.properties&amp;#039;&amp;#039;&amp;#039; file.&lt;br /&gt;
* Get the MathML 1.01 DTD and the MathML 2.0 [[#Where do I get the schemas?|schemas]], and add the directories where you local copies of the schemas are stored to the &amp;#039;&amp;#039;&amp;#039;schema.user.properties&amp;#039;&amp;#039;&amp;#039; file.&lt;br /&gt;
* Build the project.&lt;br /&gt;
* Choose an arbitray OpenDocument file &amp;#039;&amp;#039;&amp;#039;&amp;lt;odffile&amp;gt;&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
* If you are using JRE 1.5, call the ODFValidator with&lt;br /&gt;
&lt;br /&gt;
 java -jar &amp;quot;&amp;lt;path&amp;gt;/odfvalidator.jar&amp;quot; &amp;lt;odffile&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you are using JRE 1.6, call the ODFValidator with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -Djavax.xml.validation.SchemaFactory:http://relaxng.org/ns/structure/1.0=org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl&lt;br /&gt;
-Dorg.iso_relax.verifier.VerifierFactoryLoader=com.sun.msv.verifier.jarv.FactoryLoaderImpl -jar &amp;quot;&amp;lt;path&amp;gt;/odfvalidator.jar&amp;quot; &amp;lt;odffile&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Usage Summary ===&lt;br /&gt;
&lt;br /&gt;
In an Java 1.5 environment, ODFValidator is invoked by the following command:&lt;br /&gt;
&lt;br /&gt;
 java -jar &amp;quot;&amp;lt;path&amp;gt;/odfvalidator.jar&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In an Java 1.6 environment, the following command line has to be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -Djavax.xml.validation.SchemaFactory:http://relaxng.org/ns/structure/1.0=org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl&lt;br /&gt;
-Dorg.iso_relax.verifier.VerifierFactoryLoader=com.sun.msv.verifier.jarv.FactoryLoaderImpl -jar &amp;quot;&amp;lt;path&amp;gt;/odfvalidator.jar&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These command lines are abbreviated &amp;#039;&amp;#039;odfvalidator&amp;#039;&amp;#039; from now on.&lt;br /&gt;
&lt;br /&gt;
The ODFValidator may be called with the following options:&lt;br /&gt;
&lt;br /&gt;
 odfvalidator [-r] [-c|-s] [-d] [-v|-w] [-f &amp;lt;filterfile&amp;gt;] [-x &amp;lt;expclude pattern&amp;gt;] [-o outputfile] [-1.0|-1.1|-1.2] &amp;lt;odffiles&amp;gt;&lt;br /&gt;
 odfvalidator [-r] [-c|-s] [-d] [-v|-w] [-f &amp;lt;filterfile&amp;gt;] [-x &amp;lt;expclude pattern&amp;gt;] [-o outputfile] -S &amp;lt;schemafile&amp;gt; &amp;lt;odffiles&amp;gt;&lt;br /&gt;
 odfvalidator [-c|-s] [-v|-w] [-d] [-o outputfile] -C &amp;lt;configfile&amp;gt;&lt;br /&gt;
 odfvalidator -g &amp;lt;odffiles&amp;gt;&lt;br /&gt;
 odfvalidator -h&lt;br /&gt;
 odfvalidator -V&lt;br /&gt;
&lt;br /&gt;
If no parameters are specified, the files &amp;#039;&amp;#039;&amp;#039;&amp;lt;odffiles&amp;gt;&amp;#039;&amp;#039;&amp;#039; are validated using the schema that belongs to the ODF version of the file. For ODF 1.0 files the ODF 1.0 schema is used, for ODF 1.1 files the ODF 1.1 schema is used, and so on. The version of an ODF file is detected for each file separately.&lt;br /&gt;
&lt;br /&gt;
The options have the following meaning:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039;: Apply ODF conformance rules before validation: unknown markup is ignored during validation.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039;: Use MathML 1.01 DTD rather than MathML 2.0 schema for content.xml of formula documents.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-f&amp;#039;&amp;#039;&amp;#039;: Ignore error messages specified in &amp;#039;&amp;#039;&amp;#039;&amp;lt;filterfile&amp;gt;&amp;#039;&amp;#039;&amp;#039; (see [[#Specifying a filter file|Specifying a filter file]]).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;: Show the generator information of the specified &amp;#039;&amp;#039;&amp;#039;&amp;lt;odffiles&amp;gt;&amp;#039;&amp;#039;&amp;#039; without validation.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-h&amp;#039;&amp;#039;&amp;#039;: Print a short help.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-o&amp;#039;&amp;#039;&amp;#039;: Print output into specified file rather than standard output.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-r&amp;#039;&amp;#039;&amp;#039;: Process directories recursively.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039;: Use the strict schema for validation.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-v&amp;#039;&amp;#039;&amp;#039;: Verbose: print information like the generator or the documents that are processed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-w&amp;#039;&amp;#039;&amp;#039;: Print warnings.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-x&amp;#039;&amp;#039;&amp;#039;: Exclude files that match the specified [http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html#sum regular expression] from validation.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-C&amp;#039;&amp;#039;&amp;#039;: Validate using configuration file &amp;#039;&amp;#039;&amp;#039;&amp;lt;configfile&amp;gt;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-S&amp;#039;&amp;#039;&amp;#039;: Use the specified &amp;#039;&amp;#039;&amp;#039;&amp;lt;schemafile&amp;gt;&amp;#039;&amp;#039;&amp;#039; for validation.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;-V&amp;#039;&amp;#039;&amp;#039;: Print version information.&lt;br /&gt;
&lt;br /&gt;
=== Validation using default schemas ===&lt;br /&gt;
&lt;br /&gt;
The ODF 1.0, ODF 1.1, ODF 1.2 schemas as well as the MathML 1.01 DTD and the MathML 2.0 schema are included in the &amp;#039;&amp;#039;&amp;#039;ODFValidator.jar&amp;#039;&amp;#039;&amp;#039; file. If the ODFValidator is called without the &amp;#039;&amp;#039;&amp;#039;-S&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;-C&amp;#039;&amp;#039;&amp;#039; options, these schemas are used for validation.&lt;br /&gt;
&lt;br /&gt;
 odfvalidator [-r] [-c|-s] [-d] [-v|-w] [-f &amp;lt;filterfile&amp;gt;] [-x &amp;lt;expclude pattern&amp;gt;] [-o outputfile] [-1.0|-1.1|-1.2] &amp;lt;odffiles&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;odffiles&amp;gt;&amp;#039;&amp;#039;&amp;#039; is the list of files and directories that should be validated. If a directory is specified, all files that have an OpenDocument extension (like &amp;#039;&amp;#039;&amp;#039;odt&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;ods&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;ott&amp;#039;&amp;#039;&amp;#039;) are validated. If &amp;#039;&amp;#039;&amp;#039;-r&amp;#039;&amp;#039;&amp;#039; is specified additionally, all directories are processed recursively.&lt;br /&gt;
&lt;br /&gt;
By default, the ODFValidator detects the version of the files that shall be validated and chooses the corresponding schema. The command line options &amp;#039;&amp;#039;&amp;#039;-1.0&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;-1.1&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-1.2&amp;#039;&amp;#039;&amp;#039; can be used to specify that the schemas of a particular ODF version should be used for all files, regardless of the version they specify themselves.&lt;br /&gt;
&lt;br /&gt;
The command line option &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; specifies that the MathML 1.01 DTD should be used for the validation of the &amp;#039;&amp;#039;&amp;#039;content.xml&amp;#039;&amp;#039;&amp;#039; of formula documents. Default is to use the MathML 2.0 schema.&lt;br /&gt;
&lt;br /&gt;
If the &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; command line option is specified, unknown markup is ignored as specified in the conformance rules for ODF 1.0/1.1.  If the &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; command line option is specified, the strict schema is used for validation. If neither &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; nor &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; are specified, the regular ODF schemas are used, but errors are reported for unknown markup unless it appears in styles or metadata.&lt;br /&gt;
&lt;br /&gt;
The optional &amp;#039;&amp;#039;&amp;#039;-x&amp;#039;&amp;#039;&amp;#039; switch allows to exclude certain files or directories from the validation. The files that shall be excluded are specified by a [http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html#sum regular expression]. Please note that the full absolute path names of directories and files are matched against this pattern. This means that the regular expression either must include the absolute path of the files and directories that shall be excluded, or must start with &amp;#039;&amp;#039;&amp;#039;.*&amp;#039;&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;&amp;#039;-x&amp;#039;&amp;#039;&amp;#039; option can be specified only once. If several paths shall be excluded, these paths have to be specified in a single regular expression using the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; operator.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-w&amp;#039;&amp;#039;&amp;#039; is specified additionally, not only validation errors are reported, but also warnings.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-v&amp;#039;&amp;#039;&amp;#039; is specified additionally, not only validation errors and warnings are reported, but also the generator stored in the manifest, MIME types, the files that are processed, etc.&lt;br /&gt;
&lt;br /&gt;
If the &amp;#039;&amp;#039;&amp;#039;-o&amp;#039;&amp;#039;&amp;#039; option is present, all messages go into the specified file. Otherwise, they are printed to standard out. It is possible to exclude known validation errors from the output by specifying a [[#Specifying a filter file|filter file]] using the &amp;#039;&amp;#039;&amp;#039;-f&amp;#039;&amp;#039;&amp;#039; option.&lt;br /&gt;
&lt;br /&gt;
=== Validation using a non-default schema ===&lt;br /&gt;
&lt;br /&gt;
Tho specify the schema that is used for &amp;#039;&amp;#039;&amp;#039;meta-xml&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;content.xml&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;styles.xml&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;settings.xml&amp;#039;&amp;#039;&amp;#039; on the command line, ODFValidator has to be called with the following parameters:&lt;br /&gt;
&lt;br /&gt;
 odfvalidator [-r] [-c|-s] [-d] [-v|-w] [-f &amp;lt;filterfile&amp;gt;] [-x &amp;lt;expclude pattern&amp;gt;] [-o outputfile] -S &amp;lt;schemafile&amp;gt; &amp;lt;odffiles&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;schemafile&amp;gt;&amp;#039;&amp;#039;&amp;#039; is the schema that shall be used.&lt;br /&gt;
&lt;br /&gt;
All other command line option are as described in [[#Validation using default schemas|Validation using default schemas]].&lt;br /&gt;
&lt;br /&gt;
=== Validation using a configuration file ===&lt;br /&gt;
&lt;br /&gt;
The schemas and the files that should be validated can be specified in a configuration file. A configuration file is a Java XML properties file as described in the [http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html Java 2 API documentation]. The following properties are supported:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;strict-schema&amp;#039;&amp;#039;&amp;#039;: Specifies the strict schema to be used.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;manifest-schema&amp;#039;&amp;#039;&amp;#039;: Specifies the manifest schema to be used.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;mathml-schema&amp;#039;&amp;#039;&amp;#039;: Specifies the MathML 1.01 schema to be used.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;mathml2-schema&amp;#039;&amp;#039;&amp;#039;: Specifies the MathML 2 schema to be used.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;path*&amp;#039;&amp;#039;&amp;#039;: All properties whose names start with &amp;quot;path&amp;quot; are considered to be files or directories that shall be validated. &lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;recursive&amp;#039;&amp;#039;&amp;#039;: This boolean property specifies whether directories are scanned recursively. It takes the values &amp;#039;&amp;#039;&amp;#039;true&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;false&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;exclude&amp;#039;&amp;#039;&amp;#039;: Specifies files and directories that shall be excluded as a [http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html#sum regular expression]. See description of [[#Specifying the schema on the command line|&amp;#039;&amp;#039;&amp;#039;-x&amp;#039;&amp;#039;&amp;#039; option]].&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;filter&amp;#039;&amp;#039;&amp;#039;: Specifies [[#Specifying a filter file|filter file]].&lt;br /&gt;
&lt;br /&gt;
A sample configuration file looks like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE properties SYSTEM &amp;quot;http://java.sun.com/dtd/properties.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;properties&amp;gt;&lt;br /&gt;
  &amp;lt;entry key=&amp;quot;strict-schema&amp;quot;&amp;gt;/home/odf11-cd2/msv/OpenDocument-strict-schema-v1.1-cd2.rng&amp;lt;/entry&amp;gt;&lt;br /&gt;
  &amp;lt;entry key=&amp;quot;manifest-schema&amp;quot;&amp;gt;/home/odf11-cd2/msv/OpenDocument-manifest-schema-v1.1-cd2.rng&amp;lt;/entry&amp;gt;&lt;br /&gt;
  &amp;lt;entry key=&amp;quot;mathml-schema&amp;quot;&amp;gt;/home/odf11-cd2/msv/mathml2.xsd&amp;lt;/entry&amp;gt;&lt;br /&gt;
  &amp;lt;entry key=&amp;quot;path1&amp;quot;&amp;gt;/home/testdocs&amp;lt;/entry&amp;gt;&lt;br /&gt;
  &amp;lt;entry key=&amp;quot;path2&amp;quot;&amp;gt;/home/temp&amp;lt;/entry&amp;gt;&lt;br /&gt;
 &amp;lt;/properties&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Specifying a filter file ==&lt;br /&gt;
&lt;br /&gt;
It is possible to omit the output of known validation errors by adding their error message to a so called filter file. A filter file is an XML file, which matches the following [http://www.relaxng.org/compact-tutorial-20030326.html Relax-NG Compact] schema:&lt;br /&gt;
&lt;br /&gt;
 start = filter&lt;br /&gt;
 filter = element filter { filter-attlist, filter-entry+ }&lt;br /&gt;
 filter-attlist &amp;amp;= empty&lt;br /&gt;
 filter-entry = element filter-entry { filter-entry-attlist, text }&lt;br /&gt;
 filter-entry-attlist &amp;amp;=&lt;br /&gt;
   attribute task-id {&lt;br /&gt;
     xsd:string { pattern = &amp;#039;[a-z]?[0-9]+&amp;quot;&amp;#039; }&lt;br /&gt;
   }&lt;br /&gt;
 filter-entry-attlist &amp;amp;= attribute resolved-in { xsd:integer }?&lt;br /&gt;
&lt;br /&gt;
A sample filter file is&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;filter&amp;gt;&lt;br /&gt;
   &amp;lt;!-- CWS impress25/SRC680m72 --&amp;gt;&lt;br /&gt;
   &amp;lt;filter-entry task-id=&amp;quot;i38753&amp;quot; resolved-in=&amp;quot;8864&amp;quot;&amp;gt;attribute &amp;quot;presentation:display-header&amp;quot; has a bad value. Possible values are: false,true&amp;lt;/filter-entry&amp;gt;&lt;br /&gt;
 &amp;lt;/filter&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each &amp;#039;&amp;#039;&amp;#039;&amp;lt;filter-entry&amp;gt;&amp;#039;&amp;#039;&amp;#039; element described one message that shall be excluded. The message itself is the element content. The mandatory &amp;#039;&amp;#039;&amp;#039;task-id&amp;#039;&amp;#039;&amp;#039; attribute includes the task which resolves the validation error, or that has been submitted for the validation error if it has not been resolved already. &lt;br /&gt;
&lt;br /&gt;
The optional &amp;#039;&amp;#039;&amp;#039;resolved-in&amp;#039;&amp;#039;&amp;#039; attribute contains the build-id of the master where the validation error has been resolved. &lt;br /&gt;
Error messages are only omited if the &amp;#039;&amp;#039;&amp;#039;resolved-in&amp;#039;&amp;#039;&amp;#039; attribute is provided, or if the build-id is lower than the one which is stored in the &amp;#039;&amp;#039;&amp;#039;&amp;lt;meta:generator&amp;gt;&amp;#039;&amp;#039;&amp;#039; element of the file that is validated. This means that a validation error is not omitted if it occurs in a file which has been saved with an OOo version where the bug shall be resolved already.&lt;br /&gt;
&lt;br /&gt;
If a error message is omited, a warning is printed that contains the task-id specified in the filter file. Please note that warning are only printed if either the &amp;#039;&amp;#039;&amp;#039;-w&amp;#039;&amp;#039;&amp;#039; or the &amp;#039;&amp;#039;&amp;#039;-v&amp;#039;&amp;#039;&amp;#039; switch is present.&lt;br /&gt;
&lt;br /&gt;
A filter file is specified using the &amp;#039;&amp;#039;&amp;#039;-f&amp;#039;&amp;#039;&amp;#039; command line option or the &amp;#039;&amp;#039;&amp;#039;filter&amp;#039;&amp;#039;&amp;#039; property in the configuration file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Where do I get the schemas? ==&lt;br /&gt;
&lt;br /&gt;
The OpenDocument schemas are those provided on the [[http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office OASIS OpenDocument technical Committee]] page.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; Due to an issue in MSV, errors are reported that do not exist. To avoid this, the schemas build into ODFValidator have been modified.&lt;br /&gt;
&lt;br /&gt;
The MathML DTD that is included in the ODFValidator us the one that is included in the &amp;#039;&amp;#039;&amp;#039;/share/dtd/math/1_01/&amp;#039;&amp;#039;&amp;#039; folder of each OOo/StarOffice installation.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
ODFValidator requires J2RE 1.5 or J2RE 1.6. For J2RE 1.6, the following options have to be included into the &amp;#039;&amp;#039;&amp;#039;java&amp;#039;&amp;#039;&amp;#039; command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-Djavax.xml.validation.SchemaFactory:http://relaxng.org/ns/structure/1.0=org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl&lt;br /&gt;
-Dorg.iso_relax.verifier.VerifierFactoryLoader=com.sun.msv.verifier.jarv.FactoryLoaderImpl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ODFValidator further requires the following packages:&lt;br /&gt;
&lt;br /&gt;
* [https://msv.dev.java.net/ MSV]. &amp;#039;&amp;#039;&amp;#039;msv.jar&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;isorelax.jar&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;relaxngDatatype.jar&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;xsdlib.jar&amp;#039;&amp;#039;&amp;#039; included in the MSV distribution must be added to the project&amp;#039;s libraries and must be in the classpath or a folder called &amp;#039;&amp;#039;&amp;#039;lib&amp;#039;&amp;#039;&amp;#039; that is next to the &amp;#039;&amp;#039;&amp;#039;odfvalidator.jar&amp;#039;&amp;#039;&amp;#039; at runtime. &lt;br /&gt;
* [https://isorelax-jaxp-bridge.dev.java.net/ ISORELAX JARV -&amp;gt; JAXP 1.3 Xml Validation Engine Adaptor].  &amp;#039;&amp;#039;&amp;#039;isorelax-jaxp-bridge-1.0.jar&amp;#039;&amp;#039;&amp;#039; must be added to the project&amp;#039;s libraries and must be in the classpath or a folder called &amp;#039;&amp;#039;&amp;#039;lib&amp;#039;&amp;#039;&amp;#039; that is next to the &amp;#039;&amp;#039;&amp;#039;odfvalidator.jar&amp;#039;&amp;#039;&amp;#039;  at runtime. &lt;br /&gt;
* [http://odftoolkit.openoffice.org/servlets/ProjectDocumentList?folderID=759&amp;amp;expandFolder=759&amp;amp;folderID=0 ODFDOM] &amp;#039;&amp;#039;&amp;#039; odfdom.jar&amp;#039;&amp;#039;&amp;#039; from [http://odftoolkit.openoffice.org/servlets/ProjectDocumentList?folderID=759&amp;amp;expandFolder=759&amp;amp;folderID=0 ODFDOM] must be added to the project&amp;#039;s libraries and must be in the classpath or a folder called &amp;#039;&amp;#039;&amp;#039;lib&amp;#039;&amp;#039;&amp;#039; that is next to the &amp;#039;&amp;#039;&amp;#039;odfvalidator.jar&amp;#039;&amp;#039;&amp;#039;  at runtime. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Warning:&amp;#039;&amp;#039;&amp;#039; Make sure you use an up-to-date release of MSV. Older versions (before msv-20061103) report errors for the OpenDocument schema itself.&lt;br /&gt;
&lt;br /&gt;
== NetBeans Project ==&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;ODFValidator&amp;#039;&amp;#039;&amp;#039; [http://odftoolkit.openoffice.org/source/browse/odftoolkit/tools/odfvalidator/ source code] is located in the &amp;#039;&amp;#039;tools&amp;#039;&amp;#039; folder of the [http://odftoolkit.openoffice.org OpenOffice.org ODF Toolkit Project].&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;ODFValidator&amp;#039;&amp;#039;&amp;#039; ia a NebBeans project. To work with the project, just open the project folder.&lt;br /&gt;
&lt;br /&gt;
[[Category:ODF]]&lt;br /&gt;
[[Category:ODFToolkit]]&lt;br /&gt;
[[Category:ODFToolkitTool]]&lt;br /&gt;
[[Category:Effort]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123843</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123843"/>
		<updated>2009-05-08T13:43:33Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* save-compact */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the sum of the uncompressed sizes of the content.xml, styles.xml, meta.xml and settings.xml sub files is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p thread &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding command line options are:&lt;br /&gt;
 &lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p files &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose load times are recorded in the log file, as well as the load times itself. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p save-summary &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p save-summary &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose save times are recorded in the log file, as well as the save times itself.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the save times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-summary-writer &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-summary-writer &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like [[#load-summary|&amp;lt;tt&amp;gt;load-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p save-summary-writer &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p save-summary-writer &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like [[#save-summary|&amp;lt;tt&amp;gt;save-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;SwXMLWriter::WriteThroughComponent&amp;lt;/tt&amp;gt; method calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-compact ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-compact &amp;lt;log files&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-compact &amp;lt;dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays all files that are loaded in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the load duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the load speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
Instead of a list of log files, a directory that contains log files may be specified.&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
=== save-compact ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-compact &amp;lt;log files&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-compact &amp;lt;dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays all files that are saved in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the save duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the save speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
Instead of a list of log files, a directory that contains log files may be specified.&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123842</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123842"/>
		<updated>2009-05-08T13:42:40Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* load-compact */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the sum of the uncompressed sizes of the content.xml, styles.xml, meta.xml and settings.xml sub files is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p thread &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding command line options are:&lt;br /&gt;
 &lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p files &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose load times are recorded in the log file, as well as the load times itself. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p save-summary &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p save-summary &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose save times are recorded in the log file, as well as the save times itself.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the save times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-summary-writer &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-summary-writer &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like [[#load-summary|&amp;lt;tt&amp;gt;load-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p save-summary-writer &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p save-summary-writer &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like [[#save-summary|&amp;lt;tt&amp;gt;save-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;SwXMLWriter::WriteThroughComponent&amp;lt;/tt&amp;gt; method calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-compact ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-compact &amp;lt;log files&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-compact &amp;lt;dir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays all files that are loaded in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the load duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the load speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
Instead of a list of log files, a directory that contains log files may be specified.&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
=== save-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are saved in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the save duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the save speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123841</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123841"/>
		<updated>2009-05-08T13:40:47Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* save-writer-summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the sum of the uncompressed sizes of the content.xml, styles.xml, meta.xml and settings.xml sub files is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p thread &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding command line options are:&lt;br /&gt;
 &lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p files &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose load times are recorded in the log file, as well as the load times itself. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p save-summary &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p save-summary &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose save times are recorded in the log file, as well as the save times itself.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the save times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-summary-writer &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-summary-writer &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like [[#load-summary|&amp;lt;tt&amp;gt;load-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p save-summary-writer &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p save-summary-writer &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like [[#save-summary|&amp;lt;tt&amp;gt;save-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;SwXMLWriter::WriteThroughComponent&amp;lt;/tt&amp;gt; method calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are loaded in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the load duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the load speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
=== save-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are saved in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the save duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the save speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123840</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123840"/>
		<updated>2009-05-08T13:40:08Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* load-writer-summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the sum of the uncompressed sizes of the content.xml, styles.xml, meta.xml and settings.xml sub files is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p thread &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding command line options are:&lt;br /&gt;
 &lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p files &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose load times are recorded in the log file, as well as the load times itself. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p save-summary &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p save-summary &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose save times are recorded in the log file, as well as the save times itself.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the save times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-summary-writer &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-summary-writer &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like [[#load-summary|&amp;lt;tt&amp;gt;load-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#save-summary|&amp;lt;tt&amp;gt;save-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;SwXMLWriter::WriteThroughComponent&amp;lt;/tt&amp;gt; method calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are loaded in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the load duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the load speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
=== save-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are saved in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the save duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the save speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123839</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123839"/>
		<updated>2009-05-08T13:39:21Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* save-summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the sum of the uncompressed sizes of the content.xml, styles.xml, meta.xml and settings.xml sub files is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p thread &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding command line options are:&lt;br /&gt;
 &lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p files &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose load times are recorded in the log file, as well as the load times itself. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p save-summary &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p save-summary &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose save times are recorded in the log file, as well as the save times itself.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the save times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#load-summary|&amp;lt;tt&amp;gt;load-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#save-summary|&amp;lt;tt&amp;gt;save-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;SwXMLWriter::WriteThroughComponent&amp;lt;/tt&amp;gt; method calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are loaded in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the load duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the load speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
=== save-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are saved in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the save duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the save speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123837</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123837"/>
		<updated>2009-05-08T13:38:34Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the sum of the uncompressed sizes of the content.xml, styles.xml, meta.xml and settings.xml sub files is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p thread &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding command line options are:&lt;br /&gt;
 &lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p files &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose load times are recorded in the log file, as well as the load times itself. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose save times are recorded in the log file, as well as the save times itself.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the save times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#load-summary|&amp;lt;tt&amp;gt;load-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#save-summary|&amp;lt;tt&amp;gt;save-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;SwXMLWriter::WriteThroughComponent&amp;lt;/tt&amp;gt; method calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are loaded in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the load duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the load speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
=== save-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are saved in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the save duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the save speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123836</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123836"/>
		<updated>2009-05-08T13:38:17Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* threads */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the sum of the uncompressed sizes of the content.xml, styles.xml, meta.xml and settings.xml sub files is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p thread &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding command line options are:&lt;br /&gt;
 &lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -t files &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose load times are recorded in the log file, as well as the load times itself. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose save times are recorded in the log file, as well as the save times itself.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the save times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#load-summary|&amp;lt;tt&amp;gt;load-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#save-summary|&amp;lt;tt&amp;gt;save-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;SwXMLWriter::WriteThroughComponent&amp;lt;/tt&amp;gt; method calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are loaded in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the load duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the load speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
=== save-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are saved in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the save duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the save speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123834</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123834"/>
		<updated>2009-05-08T13:37:56Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* load-summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the sum of the uncompressed sizes of the content.xml, styles.xml, meta.xml and settings.xml sub files is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -t thread &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding command line options are:&lt;br /&gt;
 &lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -t files &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-summary ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log file&amp;gt; &amp;lt;comparison log file&amp;gt;&lt;br /&gt;
 RTLLog2ODF -p load-summary &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose load times are recorded in the log file, as well as the load times itself. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose save times are recorded in the log file, as well as the save times itself.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the save times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#load-summary|&amp;lt;tt&amp;gt;load-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#save-summary|&amp;lt;tt&amp;gt;save-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;SwXMLWriter::WriteThroughComponent&amp;lt;/tt&amp;gt; method calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are loaded in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the load duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the load speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
=== save-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are saved in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the save duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the save speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123833</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123833"/>
		<updated>2009-05-08T13:36:26Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the sum of the uncompressed sizes of the content.xml, styles.xml, meta.xml and settings.xml sub files is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -t thread &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding command line options are:&lt;br /&gt;
 &lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -t files &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose load times are recorded in the log file, as well as the load times itself. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose save times are recorded in the log file, as well as the save times itself.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the save times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#load-summary|&amp;lt;tt&amp;gt;load-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#save-summary|&amp;lt;tt&amp;gt;save-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;SwXMLWriter::WriteThroughComponent&amp;lt;/tt&amp;gt; method calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are loaded in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the load duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the load speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
=== save-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are saved in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the save duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the save speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123832</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123832"/>
		<updated>2009-05-08T13:35:54Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* threads */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the sum of the uncompressed sizes of the content.xml, styles.xml, meta.xml and settings.xml sub files is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
 RTLLog2ODF -t thread &amp;lt;log files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding command line options are:&lt;br /&gt;
 &lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose load times are recorded in the log file, as well as the load times itself. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose save times are recorded in the log file, as well as the save times itself.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the save times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#load-summary|&amp;lt;tt&amp;gt;load-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#save-summary|&amp;lt;tt&amp;gt;save-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;SwXMLWriter::WriteThroughComponent&amp;lt;/tt&amp;gt; method calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are loaded in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the load duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the load speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
=== save-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are saved in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the save duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the save speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123831</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123831"/>
		<updated>2009-05-08T13:27:40Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Profiles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the sum of the uncompressed sizes of the content.xml, styles.xml, meta.xml and settings.xml sub files is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose load times are recorded in the log file, as well as the load times itself. The corresponding command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. Each sheets lists the file whose save times are recorded in the log file, as well as the save times itself.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the save times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#load-summary|&amp;lt;tt&amp;gt;load-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#save-summary|&amp;lt;tt&amp;gt;save-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;SwXMLWriter::WriteThroughComponent&amp;lt;/tt&amp;gt; method calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are loaded in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the load duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the load speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
=== save-compact ===&lt;br /&gt;
&lt;br /&gt;
Displays all files that are saved in any of the given log files. For each such file, a row is created that list &lt;br /&gt;
* the save duration, &lt;br /&gt;
* the file size (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
* the save speed (compressed and uncompressed, where uncompressed means the sum of the content.xml, styles.xml, meta.xml and settings.xml sizes)&lt;br /&gt;
&lt;br /&gt;
This is a build-in profile for which no corresponding command line does exist.&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123817</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123817"/>
		<updated>2009-05-08T12:17:33Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* XPath Expressions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the sum of the uncompressed sizes of the content.xml, styles.xml, meta.xml and settings.xml sub files is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODF files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the save times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#load-summary|&amp;lt;tt&amp;gt;load-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#save-summary|&amp;lt;tt&amp;gt;save-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;SwXMLWriter::WriteThroughComponent&amp;lt;/tt&amp;gt; method calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123797</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123797"/>
		<updated>2009-05-08T11:05:53Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Profiles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the uncompressed size of the zip file is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODF files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;none&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the save times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#load-summary|&amp;lt;tt&amp;gt;load-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Like [[#save-summary|&amp;lt;tt&amp;gt;save-summary&amp;lt;/tt&amp;gt;]], except that te times for &amp;lt;tt&amp;gt;SwXMLWriter::WriteThroughComponent&amp;lt;/tt&amp;gt; method calls are included.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123796</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123796"/>
		<updated>2009-05-08T10:57:15Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* load-writer-summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the uncompressed size of the zip file is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded. The times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between two log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123795</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123795"/>
		<updated>2009-05-08T10:56:48Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* load-writer-summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the uncompressed size of the zip file is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded. The times for &amp;lt;tt&amp;gt;ReadThroughComponent&amp;lt;/tt&amp;gt; function calls are included  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This profile is useful to compare the load times between to log files. If exactly two log file are specified, then a third sheet is inserted that summarizes the changes between the two log files.&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123794</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123794"/>
		<updated>2009-05-08T10:52:36Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* XPath Expressions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or an URI.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filesize(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;[,&amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039;])&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the size of the file &amp;#039;&amp;#039;path&amp;#039;&amp;#039;. &amp;#039;&amp;#039;path&amp;#039;&amp;#039; may be a filesystem path or a file URI. &amp;#039;&amp;#039;uncompressed&amp;#039;&amp;#039; is a Boolean parameter. If its value is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; and if the file denoted by &amp;#039;&amp;#039;path&amp;#039;&amp;#039; is a zip file, then the uncompressed size of the zip file is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:qtim(&amp;#039;&amp;#039;string&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|if the first and last characters of &amp;#039;&amp;#039;string&amp;#039;&amp;#039; are both &amp;#039; or &amp;quot;, then &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned without its first and last character. Otherwise &amp;#039;&amp;#039;string&amp;#039;&amp;#039; is returned unmodified.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123790</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123790"/>
		<updated>2009-05-08T10:41:11Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Command Line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; -G &amp;lt;xpath&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-c&amp;#039;&amp;#039;&amp;#039; is provided, a row is added to the sheets only for entries specified by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option. The header of the row is specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option. Both options take XPath expressions. &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; is evaluated with the context nodes specified by &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123786</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=123786"/>
		<updated>2009-05-08T10:31:45Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Command Line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -c [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=123781</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=123781"/>
		<updated>2009-05-08T10:16:09Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Performance}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* Additional macros have to be inserted into the OpenOffice.org source code that provide the information which documents have been loaded or saved. This implementation is in progress as [http://qa.openoffice.org/issues/show_bug.cgi?id=100301 task 100301] which is assigned to CWS perftest08.&lt;br /&gt;
* 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. This tools is called &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; and is described [[RTLLog2ODF|here]].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Xml&amp;diff=123575</id>
		<title>Xml</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Xml&amp;diff=123575"/>
		<updated>2009-05-07T07:11:52Z</updated>

		<summary type="html">&lt;p&gt;Mib: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Lead: Michael Brauer&lt;br /&gt;
&lt;br /&gt;
Co-Lead: Svante Schubert&lt;br /&gt;
&lt;br /&gt;
These are the Wiki pages of the [http://xml.openoffice.org OpenOffice.org XML Project].&lt;br /&gt;
&lt;br /&gt;
The following information can be found on these pages:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
{{:Xml/Efforts}}&lt;br /&gt;
{{:Xml/ContributionAreas}}&lt;br /&gt;
{{:Xml/Tools}}&lt;br /&gt;
{{:Xml/ArticlesAndBooks}}&lt;br /&gt;
{{:Xml/Research}}&lt;br /&gt;
{{:Xml/Filters}}&lt;br /&gt;
{{:Xml/Modules}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Project]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Xml/Tools&amp;diff=123574</id>
		<title>Xml/Tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Xml/Tools&amp;diff=123574"/>
		<updated>2009-05-07T07:10:37Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* External OpenDocument Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OpenDocument Tools at OpenOffice.org =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;Tools at OpenOffice.org&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tool&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Summary&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[http://xml.openoffice.org/saxecho/ SAXEcho]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SAXEcho is a tool to be used with the OpenOffice.org application. It allows to view the XML representation of a document at runtime. It can either display the native XML file format representation of an in-memory   document, or the output of an an XSLT transformation on said document. It is written in Java.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[http://xml.openoffice.org/xfilter.html xfilter tool]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This page documents the &amp;lt;code&amp;gt;xfilter&amp;lt;/code&amp;gt; tool, which lets you execute XML-based filters (as explained in the [http://xml.openoffice.org/filter Filters using XML] document) outside of OpenOffice.org or StarOffice.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= External OpenDocument Tools =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th colspan=&amp;quot;2&amp;quot;&amp;gt;External Tools&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tool&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Summary&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ODFDOM&amp;lt;/b&amp;gt; is an OpenDocument (ODF) framework. It&amp;#039;s purpose is to provide an easy common way to create, access and manipulate ODF files, without requiring detailed knowledge of the ODF specification.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[http://odftoolkit.org/projects/odftoolkit/pages/ODFValidator ODF Validator]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ODF Validator&amp;lt;/b&amp;gt; is a Java tool that validates OpenDocument files and checks them for certain conformance criteria.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[http://tools.odftoolkit.org/odfvalidator ODF Online Validator]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ODF Online Validator&amp;lt;/b&amp;gt; is an online validation and conformance check tool for ODF documents.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[http://odftoolkit.org/projects/odftoolkit/pages/ODFXSLTRunner ODF XSLT Runner]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ODF XSLT Runner&amp;lt;/b&amp;gt; is a small Java command line application that allows you to apply XSLT stylesheets to XML streams included in ODF packages without extracting them from the package.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[http://odftoolkit.org/projects/odftoolkit/pages/ODFXSLTRunnerTask ODF XSLT Runner Task]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ODF XSLT Runner Task&amp;lt;/b&amp;gt; is a task definition for Ant which allows to apply XSLT stylesheets to ODF documents similar to Ant&amp;#039;s build-in &amp;amp;lt;xslt&amp;amp;gt; task. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[http://search.cpan.org/dist/OpenOffice-OODoc The Perl OpenDocument Connector]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This toolkit allows direct OpenDocument file update and creation from Perl scripts. It works with the main document classes (texts, spreadsheets, presentations, and drawings), and provides an easy access to a large set of content and presentation elements.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[http://zope.org/Members/struktur/CMFOODocumentV02 CMFOODocument]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OpenOffice Documents for [http://www.icoya.com icoya Content &amp;amp; Collaboration Management] - With CMFOODocument OpenOffice Writer files can easily be integrated inside your Plone site. The OO-Documents are converted by XSL transformation into HTML.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[http://ooolib.sourceforge.net/ OpenOffice.org Perl Library]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The OpenOffice.org Perl Library (ooolib) can be used to create simple OpenOffice.org Calc spreadsheet and Writer text documents.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Xml/Efforts&amp;diff=123179</id>
		<title>Xml/Efforts</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Xml/Efforts&amp;diff=123179"/>
		<updated>2009-05-06T13:21:36Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Current Efforts of the XML Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Current Efforts of the XML Project =&lt;br /&gt;
&lt;br /&gt;
* [http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office OpenDocument]: Contributions to the formula specification that is developed by the [http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office-formula OASIS OpenDocument Formula Subcommittee].&lt;br /&gt;
&lt;br /&gt;
* [http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office OpenDocument]: Contributions to the metadata enhancements for OpenDocument v1.2 that are developed by the [http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office-formula OASIS OpenDocument Metadata Subcommittee].&lt;br /&gt;
&lt;br /&gt;
* [http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office OpenDocument]: Contributions to the OpenDocument v1.2 specification, including reviews of the specification documents.&lt;br /&gt;
&lt;br /&gt;
* [http://performance.openoffice.org Performance improvements]: The XML project participates in the [http://performance.openoffice.org Performance project]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Xml/Efforts&amp;diff=123176</id>
		<title>Xml/Efforts</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Xml/Efforts&amp;diff=123176"/>
		<updated>2009-05-06T13:19:23Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Current Efforts of the XML Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Current Efforts of the XML Project =&lt;br /&gt;
&lt;br /&gt;
* [http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office OpenDocument]: Contributions to the formula specification that is developed by the [http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office-formula OASIS OpenDocument Formula Subcommittee].&lt;br /&gt;
&lt;br /&gt;
* [http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office OpenDocument]: Contributions to the metadata enhancements for OpenDocument v1.2 that are developed by the [http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office-formula OASIS OpenDocument Metadata Subcommittee].&lt;br /&gt;
&lt;br /&gt;
* [http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office OpenDocument]: Contributions to the OpenDocument v1.2 specification, including reviews of the specification documents.&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Performance/People&amp;diff=116174</id>
		<title>Performance/People</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Performance/People&amp;diff=116174"/>
		<updated>2009-03-18T10:45:41Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* People working in the performance project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Performance}}&lt;br /&gt;
=== People working in the performance project ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name || OOo user || IRC nick name || Role and tasks in performance project || Affiliation&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Sb|Stephan Bergmann]]|| sb || sb || Startup performance (Unix) || Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:mib|Michael Brauer]]|| mib|| odf-mib || [[RTLLogFileAnalysis|Analyzing load/save performance]], [[RTLLog2ODF|analysis tools]]  || Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Xiuzhi Cheng|| xzcheng || xiuzhi||  || Beijing Redflag CH2000&lt;br /&gt;
|-&lt;br /&gt;
| [[User:cd|Carsten Driesner]]|| cd|| cd_oo  || Startup performance (Windows) || Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| Heng Li|| LiHeng || liheng || Performance Project Lead || Beijing Redflag CH2000&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Pj|Peter Junge]]|| pj || peter13j || Observer || Beijing Redflag CH2000&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Dl|Dieter Loeschky]]|| dl|| DieterLoeschky || Performance Project Lead || Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:ErAck|Eike Rathke]] || er || erAck || Calc performance || Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:mt|Malte Timmermann]]|| mt|| Malte || Analyzing and trying different stuff || Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
| [[User:yugq|Guoqiang Yu]]|| yugq || yugq || Startup, load and save || Beijing Redflag CH2000&lt;br /&gt;
|-&lt;br /&gt;
| [[User:liangjun|Liangjun Zeng]]|| zengliangjun || liangjun || Startup || Beijing Redflag CH2000&lt;br /&gt;
|-&lt;br /&gt;
| [[User:fl|Frank Loehmann]]|| fl || frankl || UX || Sun Microsystems&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
List of all members registered to the performance project: [http://performance.openoffice.org/servlets/ProjectMemberList Project Member List]&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=116173</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=116173"/>
		<updated>2009-03-18T10:43:50Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the [http://tools.openoffice.org/profiling/profiling-howto.html RTL_LOGFILE] feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116172</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116172"/>
		<updated>2009-03-18T10:41:15Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Performance}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* Additional macros have to be inserted into the OpenOffice.org source code that provide the information which documents have been loaded or saved. This implementation is in progress as [http://qa.openoffice.org/issues/show_bug.cgi?id=100301 task 100301] which is assigned to CWS mib10.&lt;br /&gt;
* 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. This tools is called &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; and is described [[RTLLog2ODF|here]].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=116171</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=116171"/>
		<updated>2009-03-18T10:40:05Z</updated>

		<summary type="html">&lt;p&gt;Mib: /*  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the RTL_LOGFILE feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=116170</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=116170"/>
		<updated>2009-03-18T10:39:25Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is an analysis tool for log files created using the RTL_LOGFILE feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=116169</id>
		<title>RTLLog2ODF</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLog2ODF&amp;diff=116169"/>
		<updated>2009-03-18T10:39:06Z</updated>

		<summary type="html">&lt;p&gt;Mib: New page: == Introduction ==  &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039; is an analysis tool for log files created using the RTL_LOGFILE feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which th...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039; is an analysis tool for log files created using the RTL_LOGFILE feature. It is similar to the existing  RTL_LOGFILE analysis perl scripts, from which the parser logic has been adopted. It takes one or more RTL log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
== Building RTLLog2ODF ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
== Command Line ==&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
== XPath Expressions ==&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Profiles ==&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
=== threads ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== files ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== load-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== save-writer-summary ===&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Intermediate XML File Format==&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;root&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;comment&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;file&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;block&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;stamp&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116168</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116168"/>
		<updated>2009-03-18T10:34:23Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Performance}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* Additional macros have to be inserted into the OpenOffice.org source code that provide the information which documents have been loaded or saved. This implementation is in progress as [http://qa.openoffice.org/issues/show_bug.cgi?id=100301 task 100301] which is assigned to CWS mib10.&lt;br /&gt;
* 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. This tools is described below.&lt;br /&gt;
&lt;br /&gt;
[[RTLLog2ODF]]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116167</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116167"/>
		<updated>2009-03-18T10:34:00Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* RTL_LOGFILE Analysis Tool (RTLLog2ODF) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Performance}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* Additional macros have to be inserted into the OpenOffice.org source code that provide the information which documents have been loaded or saved. This implementation is in progress as [http://qa.openoffice.org/issues/show_bug.cgi?id=100301 task 100301] which is assigned to CWS mib10.&lt;br /&gt;
* 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. This tools is described below.&lt;br /&gt;
&lt;br /&gt;
[RTLLog2ODF]&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116166</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116166"/>
		<updated>2009-03-18T10:31:44Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Performance}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* Additional macros have to be inserted into the OpenOffice.org source code that provide the information which documents have been loaded or saved. This implementation is in progress as [http://qa.openoffice.org/issues/show_bug.cgi?id=100301 task 100301] which is assigned to CWS mib10.&lt;br /&gt;
* 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. This tools is described below.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool (RTLLog2ODF) ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Source Code ===&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
=== Building RTLLog2ODF ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is written in Java. The &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder in [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository] contains a NetBeans project where the usual NetBeans targets can be used to build &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039;. Alternatively, Ant can be called directly with the &amp;lt;tt&amp;gt;build.xml&amp;lt;/tt&amp;gt; file which is located in the &amp;lt;tt&amp;gt;rtllog2odf&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; requires [http://odftoolkit.org/projects/odftoolkit/downloads/7/download odfdom.jar] from the [http://odftoolkit.org/projects/odftoolkit/pages/ODFDOM ODFDOM project] at build and at run time.&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== XPath Expressions ===&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116165</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116165"/>
		<updated>2009-03-18T10:16:32Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* RTL_LOGFILE Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Performance}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* Additional macros have to be inserted into the OpenOffice.org source code that provide the information which documents have been loaded or saved. This implementation is in progress as [http://qa.openoffice.org/issues/show_bug.cgi?id=100301 task 100301] which is assigned to CWS mib10.&lt;br /&gt;
* 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. This tools is described below.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool (RTLLog2ODF) ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Source Code ===&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== XPath Expressions ===&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116164</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116164"/>
		<updated>2009-03-18T10:01:05Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Performance}}&lt;br /&gt;
= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* Additional macros have to be inserted into the OpenOffice.org source code that provide the information which documents have been loaded or saved. This implementation is in progress as [http://qa.openoffice.org/issues/show_bug.cgi?id=100301 task 100301] which is assigned to CWS mib10.&lt;br /&gt;
* 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. This tools is described below.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool (RTLLog2ODF) ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Source Code ===&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== XPath Expressions ===&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116163</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116163"/>
		<updated>2009-03-18T10:00:39Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Performance}}&lt;br /&gt;
= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* Additional macros have to be inserted into the OpenOffice.org source code that provide the information which documents have been loaded or saved. This implementation is in progress as [http://qa.openoffice.org/issues/show_bug.cgi?id=100301 RTL_LOGFILE task 100301] which is assigned to CWS mib10.&lt;br /&gt;
* 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. This tools is described below.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool (RTLLog2ODF) ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Source Code ===&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== XPath Expressions ===&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116162</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116162"/>
		<updated>2009-03-18T09:59:32Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Performance}}&lt;br /&gt;
= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* Additional macros have to be inserted into the OpenOffice.org source code that provide the information which documents have been loaded or saved. This is done as [[http://qa.openoffice.org/issues/show_bug.cgi?id=100301 RTL_LOGFILE task 100301] which is resolved in CWS mib10.&lt;br /&gt;
* 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. This tools is described below.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool (RTLLog2ODF) ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Source Code ===&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== XPath Expressions ===&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116160</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116160"/>
		<updated>2009-03-18T09:40:53Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Performance}}&lt;br /&gt;
= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
* 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. This tools is described below.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool (RTLLog2ODF) ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Source Code ===&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== XPath Expressions ===&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116159</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116159"/>
		<updated>2009-03-18T09:39:32Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Command Line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Performance}}&lt;br /&gt;
= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
Both implementations are in progress.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool (RTLLog2ODF) ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Source Code ===&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== XPath Expressions ===&lt;br /&gt;
&lt;br /&gt;
The [http://www.w3.org/TR/xpath XPath] expressions that control the generation of the spreadsheet support the following extension functions:&lt;br /&gt;
&lt;br /&gt;
{| border&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Descriptions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;rtllog:filename(&amp;#039;&amp;#039;path&amp;#039;&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|returns the filename part of &amp;#039;&amp;#039;path&amp;#039;&amp;#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116158</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=116158"/>
		<updated>2009-03-18T09:32:40Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* RTL_LOGFILE Analysis Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Performance}}&lt;br /&gt;
= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
Both implementations are in progress.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool (RTLLog2ODF) ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 log files as input, and creates an ODF spreadsheet. How the performance data is presented in the spreadsheet can be controlled by a set of [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Source Code ===&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2ODF&amp;#039;&amp;#039;&amp;#039; is available in the [http://performance.openoffice.org/source/browse/performance/ performance projects SVN repository].&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2odf.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2odf.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115553</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115553"/>
		<updated>2009-03-11T15:51:59Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Command Line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
Both implementations are in progress.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Source Code ===&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; will be committed soon.&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2xml.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with a &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; options that results in two sheets, then an additional sheet is generated that list the time differences between the sheets for the two log files.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115552</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115552"/>
		<updated>2009-03-11T15:39:35Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Command Line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
Both implementations are in progress.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Source Code ===&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; will be committed soon.&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2xml.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided with exactly two RTL log files as input files, then an additional sheet is generated that &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115551</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115551"/>
		<updated>2009-03-11T15:37:34Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Source Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
Both implementations are in progress.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Source Code ===&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; will be committed soon.&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2xml.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115550</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115550"/>
		<updated>2009-03-11T15:37:19Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* RTL_LOGFILE Analysis Tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
Both implementations are in progress.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Source Code ===&lt;br /&gt;
&lt;br /&gt;
The source code for &amp;#039;&amp;#039;&amp;#039;RtlLog2XML&amp;#039;&amp;#039;&amp;#039; will be committed soon.&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2xml.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115549</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115549"/>
		<updated>2009-03-11T15:34:53Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Command Line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
Both implementations are in progress.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2xml.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath]] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115548</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115548"/>
		<updated>2009-03-11T15:34:19Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Command Line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
Both implementations are in progress.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2xml.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a [[#Profiles|profile]] is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
The following profiles are predefined. To get a list of all profiles that are available &amp;#039;&amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;&amp;#039; may be called without arguments.&lt;br /&gt;
&lt;br /&gt;
==== threads ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each thread on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//thread&amp;quot; -T &amp;quot;concat(&amp;#039;Thread &amp;#039;,@thread-id)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== files ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet. The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;@name&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== load-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are loaded.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;::SfxFrameLoader::load&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::LoadOwnFormat&amp;#039; and starts-with(.,&amp;#039;loading &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot;&lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;ReadThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== save-writer-summary ====&lt;br /&gt;
&lt;br /&gt;
Displays the data of each log file on a separate sheet, where the data on the sheets is grouped by the ODT files that are saved.  The corresponding options command line options are:&lt;br /&gt;
&lt;br /&gt;
 -t &amp;quot;//file&amp;quot; -T &amp;quot;rtllog:filename(@name)&amp;quot; -g &amp;quot;.//block[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039;]&amp;quot; &lt;br /&gt;
 -G &amp;quot;rtllog:filename(substring-after(.//stamp[@function=&amp;#039;SfxObjectShell::SaveTo_Impl&amp;#039; and starts-with(.,&amp;#039;saving &amp;#039;)],&amp;#039; &amp;#039;))&amp;quot; &lt;br /&gt;
 -i &amp;quot;@function=&amp;#039;SwXMLWriter::WriteThroughComponent&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115546</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115546"/>
		<updated>2009-03-11T15:24:55Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Command Line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
Both implementations are in progress.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2xml.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file]], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a profile is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115545</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115545"/>
		<updated>2009-03-11T15:24:20Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* RTL_LOGFILE Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
Both implementations are in progress.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2xml.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the [[#Intermediate_XML_File_Format|intermediate XML file] that is matched by the [http://www.w3.org/TR/xpath XPath] expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The [http://www.w3.org/TR/xpath XPath] expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the [[#Intermediate_XML_File_Format|intermediate XML file], a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an [http://www.w3.org/TR/xpath XPath] expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean [http://www.w3.org/TR/xpath XPath] expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an [[#Intermediate_XML_File_Format|XML file]] only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a profile is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115544</id>
		<title>RTLLogFileAnalysis</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=RTLLogFileAnalysis&amp;diff=115544"/>
		<updated>2009-03-11T15:19:49Z</updated>

		<summary type="html">&lt;p&gt;Mib: /* Intermediate XML file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= RTL_LOGFILE Analysis =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
[http://tools.openoffice.org/profiling/profiling-howto.html 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.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Possible use cases are:&lt;br /&gt;
&lt;br /&gt;
* The comparison of load save times for a large set of document between a master build and a CWS.&lt;br /&gt;
* 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.&lt;br /&gt;
* To provide metrics that show performance improvements that have been achieved.&lt;br /&gt;
* To find documents whose load or save time is significant above or below the average, and which therefore are either &lt;br /&gt;
** worth a deeper investigation (with other tools), or &lt;br /&gt;
** appear to be non appropriate as test documents for a performance improvement that is assumed to effect all documents.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
In order to use RTL_LOGFILE as described above, two tasks need to be completed:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
Both implementations are in progress.&lt;br /&gt;
&lt;br /&gt;
== RTL_LOGFILE Analysis Tool ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
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 [http://www.w3.org/TR/xpath XPath] expressions.&lt;br /&gt;
&lt;br /&gt;
The creation of the spreadsheet takes places in two steps. In a first step, the text based RTL log file is converted into an [[#Intermediate_XML_File_Format|intermediate XML file]]. In a second step, the XML tree is converted into an ODF spreadsheet. Two kinds of conversions are available: In the &amp;#039;&amp;#039;detailed&amp;#039;&amp;#039; conversion, a set of sheets is created, there each sheet contains the data for a log file, a thread, a particular load save operation, or another sub tree of the log file. In the &amp;#039;&amp;#039;summary&amp;#039;&amp;#039; conversion, each sheet additionally contains column group where each group contains the data for load/save operation, ot another sub tree of the log file.&lt;br /&gt;
&lt;br /&gt;
=== Command Line ===&lt;br /&gt;
&lt;br /&gt;
The RTL_LOGFILE analysis tool is invoked by one of these commands:&lt;br /&gt;
&lt;br /&gt;
 java -jar rtllog2xml.jar  -d &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;xml file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -s [-t &amp;lt;xpath&amp;gt;] [-T &amp;lt;xpath&amp;gt;] -g &amp;lt;xpath&amp;gt; [-G &amp;lt;xpath&amp;gt;] [-i &amp;lt;xpath&amp;gt;] &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
 java -jar rtllog2xml.jar  -p &amp;lt;profile&amp;gt; &amp;lt;rtl log file&amp;gt; [&amp;lt;rtl log file&amp;gt; ...] &amp;lt;ods file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is not provided, the given RTL log files &amp;#039;&amp;#039;&amp;lt;rtl log file&amp;gt;&amp;#039;&amp;#039; are transformed into a spreadsheet document &amp;#039;&amp;#039;&amp;lt;ods file&amp;gt;&amp;#039;&amp;#039;. A sheet is created for each node in the intermediate XML file that is matched by the XPath expression specified with the option &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039;. A title for the spreadsheet can be specified by the option &amp;#039;&amp;#039;&amp;#039;-T&amp;#039;&amp;#039;&amp;#039;. The XPath expression specified by this option is evaluated with the nodes selected by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes, and the resulting string value is used as title.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-s&amp;#039;&amp;#039;&amp;#039; is provided, the results on the sheet are grouped into columns. For each sub tree in the intermediate XML file, a set of columns is created that contains the entries for that group. The groups are selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes specified by &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; as context nodes. The number of entries must be the same for each group. The same applies to their function names and messages. A title for each group can be specified by the &amp;#039;&amp;#039;&amp;#039;-G&amp;#039;&amp;#039;&amp;#039; option, which takes an XPath expression that is evaluated with the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; option as context nodes.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;-i&amp;#039;&amp;#039;&amp;#039; option allows to specify an include filter. It takes a boolean XPath expression, which is evaluated for each descendant node of the nodes selected by the &amp;#039;&amp;#039;&amp;#039;-t&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;-g&amp;#039;&amp;#039;&amp;#039; options. Only nodes where the result of evaluating the expression is &amp;#039;&amp;#039;true&amp;#039;&amp;#039; are included.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-d&amp;#039;&amp;#039;&amp;#039; is provided, the given RTL log files are transformed into an XML file only.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;-p&amp;#039;&amp;#039;&amp;#039; is specified a profile is selected. A profile is a set of XPath expressions for the above options.&lt;br /&gt;
&lt;br /&gt;
=== Intermediate XML File Format===&lt;br /&gt;
&lt;br /&gt;
The intermediate XML File contains the following elements and attributes:&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;root&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;&amp;lt;root&amp;gt;&amp;lt;/tt&amp;gt; is the root element. It has no attributes. The child elements are &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;comment&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;comment&amp;gt;&amp;lt;/tt&amp;gt; element contains a comment. It is created for all lines in the RTL log file which do not start with a time stamp.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single log file. One &amp;lt;tt&amp;gt;&amp;lt;file&amp;gt;&amp;lt;/tt&amp;gt; element is created for each file name that is passed as parameter to &amp;#039;&amp;#039;RTLLog2XML&amp;#039;&amp;#039;. The file name is included in the attribute &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;file&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;thread&amp;gt;&amp;lt;/tt&amp;gt; element contains the data for a single thread. The thread id is included in the attribute &amp;lt;tt&amp;gt;thread-id&amp;lt;/tt&amp;gt;. The child elements are &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;block&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;. A single &amp;lt;tt&amp;gt;&amp;lt;block&amp;gt;&amp;lt;/tt&amp;gt; element is created for each matching pair of these lines. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;start-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;{&amp;#039;&amp;#039;&amp;#039; line. The &amp;lt;tt&amp;gt;end-time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039; line. Both time stamps are specified as [http://www.w3.org/TR/xmlschema-2/#duration XSD durations].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;stamp&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;lt;stamp&amp;gt;&amp;lt;/tt&amp;gt; element contains the data of RTL log file lines which have a type &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039;. The &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; attribute contains the function name, if present in the log file line. The &amp;lt;tt&amp;gt;owner&amp;lt;/tt&amp;gt; attribute contains the author, if present in the log file line. The &amp;lt;tt&amp;gt;component&amp;lt;/tt&amp;gt; attribute contains the component, if present in the log file line. The &amp;lt;tt&amp;gt;time&amp;lt;/tt&amp;gt; attribute contains the time stamp included in the &amp;#039;&amp;#039;&amp;#039;|&amp;#039;&amp;#039;&amp;#039; line as [http://www.w3.org/TR/xmlschema-2/#duration XSD duration].&lt;/div&gt;</summary>
		<author><name>Mib</name></author>
	</entry>
</feed>