File: bench_run.xml

package info (click to toggle)
scilab 5.2.2-9
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 334,832 kB
  • ctags: 52,586
  • sloc: xml: 526,945; ansic: 223,590; fortran: 163,080; java: 56,934; cpp: 33,840; tcl: 27,936; sh: 20,397; makefile: 9,908; ml: 9,451; perl: 1,323; cs: 614; lisp: 30
file content (173 lines) | stat: -rw-r--r-- 5,246 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) INRIA
 *
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
 * are also available at
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" 
	  xmlns:xlink="http://www.w3.org/1999/xlink" 
	  xmlns:svg="http://www.w3.org/2000/svg" 
	  xmlns:ns5="http://www.w3.org/1999/xhtml" 
	  xmlns:mml="http://www.w3.org/1998/Math/MathML" 
	  xmlns:db="http://docbook.org/ns/docbook" 
	  version="5.0-subset Scilab" xml:id="bench_run" xml:lang="en">
  <info>
    <pubdate>$LastChangedDate: 2009-12-07 $</pubdate>
  </info>
  <refnamediv>
    <refname>bench_run</refname>
    <refpurpose>Launch benchmark tests</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <title>Calling Sequence</title>
    <synopsis>
      bench_run()
      bench_run(module[,test_name[,options]])
    </synopsis>
  </refsynopsisdiv>
  <refsection>
    <title>Parameters</title>
    <variablelist>
      <varlistentry>
        <term>module</term>
        <listitem>
          <para>a vector of string. It can be the name of a module or the absolute path of a toolbox.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>test_name</term>
        <listitem>
          <para>a vector of string</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>options</term>
        <listitem>
          <para>a vector of string</para>
          <itemizedlist>
            <listitem>
              <para>list : list of the benchmark tests available in a module</para>
            </listitem>
            <listitem>
              <para>help : displays some examples of use in the Scilab console</para>
            </listitem>
            <listitem>
              <para>nb_run=value : repeat the benchmark test value times</para>
            </listitem>
          </itemizedlist>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>
  <refsection>
    <title>Description</title>
    <para>
   Search for .tst files in benchmark test library
   execute them, and display a report about execution time.
   The .tst files are searched in directories SCI+"/modules/*/tests/benchmark".
   </para>
   <para>
   Special tags may be inserted in the .tst file, which help to 
   control the processing of the corresponding test. These tags
   are expected to be found in Scilab comments.
   </para>
    <para>These are the available tags :</para>
   <itemizedlist>
     <listitem>
       <para>
       &#60;-- BENCH NB RUN : 10 --&#62;
       This test will be repeated 10 times.
       </para>
       </listitem>
       <listitem>
       <para>
       &#60;-- BENCH START --&#62;
       &#60;-- BENCH END --&#62;
       The interesting part of the benchmark must be enclosed by these
       tags.
       </para>
       </listitem>
     </itemizedlist>
  </refsection>

<refsection>
  <title>Examples</title>
  <para>Some simple examples of invocation of bench_run</para>
  <programlisting role="example"><![CDATA[ 
// Launch all tests
bench_run();
bench_run([]);
bench_run([],[]);

// Test one or several module
bench_run('core');
bench_run('core',[]);
bench_run(['core','string']);

// Launch one or several test in a specified module
bench_run('core',['trycatch','opcode']);

// With options
bench_run([],[],'list');
bench_run([],[],'help');
bench_run([],[],'nb_run=2000');
 ]]></programlisting>
  <para>An example of a benchmark file. This file corresponds to the
    file
    SCI/modules/linear_algebra/tests/benchmarks/bench_chol.tst.</para>
  <programlisting role="example"><![CDATA[ 
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2007-2008 - INRIA
//
//  This file is distributed under the same license as the Scilab package.
// =============================================================================

//==============================================================================
// Benchmark for chol function
//==============================================================================

// <-- BENCH NB RUN : 10 -->

stacksize(30000000);

a = 0;
b = 0;
a = rand(900, 900, 'n');
a = a'*a;

// <-- BENCH START -->
b = chol(a);
// <-- BENCH END -->
 ]]></programlisting>
  <para>The result of the test</para>
  <programlisting role="example"><![CDATA[ 
-->bench_run('linear_algebra','bench_chol')

             Boucle For .......................................       0.19 µs [ 1000000 x]

   001/001 - [linear_algebra] bench_chol ......................  151576.71 µs [      10 x]
 ]]></programlisting>
</refsection>

  <refsection>
    <title>See Also</title>

    <simplelist type="inline">
      <member><link linkend="test_run">test_run</link></member>
    </simplelist>
  </refsection>

  <refsection>
    <title>Authors</title>
    <simplelist type="vert">
      <member>Yann Collette</member>
    </simplelist>
  </refsection>
</refentry>