Just the basics on how to:
- run
- code
- compile

Also an example of XML dump.

Signed-off-by: Gilles Carry <[EMAIL PROTECTED]>
---
 testcases/realtime/doc/XML |  241 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 241 insertions(+), 0 deletions(-)
 create mode 100644 testcases/realtime/doc/XML

diff --git a/testcases/realtime/doc/XML b/testcases/realtime/doc/XML
new file mode 100644
index 0000000..61a9ef5
--- /dev/null
+++ b/testcases/realtime/doc/XML
@@ -0,0 +1,241 @@
+XML library
+===========
+
+Why dump resluts and stats with XML?
+------------------------------------
+
+RT tests already generate stats and plot files. What XML can give more?
+
+Post processing:
+XML provides an easy way to transform the data without the need to change and
+recompile the test. Just create or modify an Xquery to get the requested 
output.
+
+Regression/comparison/correlation:
+With XML data, it's easy to gather several tests outputs and see what changed
+from one test to another.
+Plotting combined graphic can be made very easy using the proper Xquery.
+
+
+Run test with XML
+-----------------
+
+Usage:
+       Run test with -x option.
+       Example:
+               mtrix_mult -x my-kernel-setting-1.1
+
+For each run, an XML dump file is created.
+The file is names <testname>.<timestamp>.xml
+
+Note:
+       This library does not offer any post-processing tool.
+
+
+Develop with libxml
+-------------------
+
+Synopsis:
+       xml_stream_t *xs;
+
+       rt_init(option_string, parse_args, argc, argv);
+               ...
+       xs =  xml_stream_init("foo", "ltp-run", "foo test");
+
+
+       /* Begin of application XML dump. */
+       /* Use according to taste. */
+       xml_start_tag (xs, "this-node");
+               ...
+               xml_start_tag (xs, "other-node");
+               ...
+               xml_end_tag (xs, "other-node");
+               ...
+       xml_end_tag (xs, "this-node");
+               ...
+       xml_entry (xs, "data", "%s %ld", mystring, mylong);
+               ...
+       xml_empty_tag (xs, "empty-node");
+               ...
+       /* End of application XML dump. */
+
+       xml_stream_close(xs, "ltp-run");
+
+
+Note:
+       rt_init must be called before xml_stream_init as the former sets global
+       variables used by xml_stream_init in order to setup headers in XML
+       document.
+
+
+Warning:
+       This library does not perform any check: document well-formed and
+       grammar are programmer's responsibility.
+
+
+Compilation:
+       To build tests with libxml run:
+               LIB_XML=1 make
+
+
+Adding XML dump to your test:
+       Make XML conditional: use #ifdef LIB_XML to include specific code.
+
+       To initialize the XML stream:
+       xs = xml_stream_init("myXMLfile", "myRootTag", "The test title here");
+
+       This creates a new XML document by opening a file descriptor and adding
+       all proper headers (using global variables set by rt_init:
+       kernel_dev_id).
+
+
+       To write a node start tag <mynode> to XML document:
+       xml_start_tag (xs, "mynode");
+
+
+       To write a node end tag </mynode> to XML document:
+       xml_end_tag (xs, "mynode");
+
+
+       To write data enclosed by tags <mytag>anystring</mytag> to XML document:
+       xml_entry (xs, "mytag", "printf style format", args...);
+
+
+       To write an empty node tag </mynode> to XML document:
+       void xml_empty_tag (xs, "mynode");
+
+
+       To terminate the XML stream:
+       xml_stream_close(xs, "myRootTag");
+       myRootTag must be the same as used in xml_stream_init.
+
+
+XML document header:
+       Basically, this is to compare test runs performed on differents
+       architectures/kernels/configurations and spot regressions.
+       Hence, it is vital to identify the conditions in which the test was
+       run.  This library automatically adds information to allow this
+       identification.
+
+       In the header we can find the following elements:
+       <title>: 
+       <start-time>: 
+       <systeminfo>:
+               Though it is not possible to completely identify what's in the
+               box/kernel, this compound element gives an overall view of the
+               architecure.
+               Subelements descritpion:
+               <uname>: report data as 'uname -a'
+               <kernel-dev-id>: a free field set by user to tell what's the
+               difference between the here-used kernel (probably hacked) and
+               the original version reported by uname.
+               This is set by the -x arg in the command line.
+               <online-cpus>: obvious
+               <sys>: a structure of tags that imitate /sys filesystem, though
+               only featuring the useful information that describe the system's
+               topology: how many cpu nodes/cores/threads.
+               As an example, two system featuring each 8 online cpus may
+               offer very different performances in thread parallelization.
+               Looking at <systeminfo> gives the answer as one is a
+               4-dualthread-cpu box while the other is an 8-unthreaded-cpu box.
+                       
+
+XML document application dump:
+       Application (the test itself) should not only dump results and samples
+       but also information about the condition in which the test has been run.
+       In the example below:
+       <parameters>
+               <iterations>
+               <calc-per-iter>
+
+
+Example of generated XML
+------------------------
+
+<?xml version="1.0" encoding="UTF-8"?>
+<ltp-run>
+    <title>matrix-mult</title>
+    <start-time>2008-10-23.10-06-43</start-time>
+    <systeminfo>
+        <uname>
+            <sysname>Linux</sysname>
+            <nodename>excalibur</nodename>
+            <release>2.6.26.6-rt11</release>
+            <version>#146 SMP PREEMPT RT Tue Oct 14 09:15:00 CEST 
2008</version>
+            <machine>ppc64</machine>
+        </uname>
+        <sys>
+            <devices>
+                <system>
+                    <node>
+                        <node0>
+                            <cpu0/>
+                            <cpu1/>
+                            <cpu2/>
+                            <cpu3/>
+                        </node0>
+                        <node1>
+                            <cpu4/>
+                            <cpu5/>
+                            <cpu6/>
+                            <cpu7/>
+                        </node1>
+                    </node>
+                    <cpu>
+                        <cpu0>
+                            <topology>
+                                
<thread_siblings_list>0-1</thread_siblings_list>
+                            </topology>
+                        </cpu0>
+                        <cpu1>
+                            <topology>
+                                
<thread_siblings_list>0-1</thread_siblings_list>
+                            </topology>
+                        </cpu1>
+                        <cpu2>
+                            <topology>
+                                
<thread_siblings_list>2-3</thread_siblings_list>
+                            </topology>
+                        </cpu2>
+                        <cpu3>
+                            <topology>
+                                
<thread_siblings_list>2-3</thread_siblings_list>
+                            </topology>
+                        </cpu3>
+                        <cpu4>
+                            <topology>
+                                
<thread_siblings_list>4-5</thread_siblings_list>
+                            </topology>
+                        </cpu4>
+                        <cpu5>
+                            <topology>
+                                
<thread_siblings_list>4-5</thread_siblings_list>
+                            </topology>
+                        </cpu5>
+                        <cpu6>
+                            <topology>
+                                
<thread_siblings_list>6-7</thread_siblings_list>
+                            </topology>
+                        </cpu6>
+                        <cpu7>
+                            <topology>
+                                
<thread_siblings_list>6-7</thread_siblings_list>
+                            </topology>
+                        </cpu7>
+                    </cpu>
+                </system>
+            </devices>
+        </sys>
+        <kernel-dev-id>special-hack-v2</kernel-dev-id>
+        <online-cpus>8</online-cpus>
+    </systeminfo>
+    <testname>matrix_mult</testname>
+    <title>Matrix Multiplication (SMP Performance)</title>
+
+    <!-- Application dump here -->
+    <parameters>
+        <iterations>128</iterations>
+        <calc-per-iter>8</calc-per-iter>
+    </parameters>
+    ...snip...
+
+</ltp-run>
-- 
1.5.5.GIT


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to