Salome HOME
577f2fdfb1c684eeddbda0ef173daac228d30831
[tools/medcoupling.git] / src / INTERP_KERNELTest / perf_test.sh
1 #!/bin/bash
2 # Copyright (C) 2007-2016  CEA/DEN, EDF R&D
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 # should be run from the build directory, so that ./PerfTest is available 
22 # output file
23 #
24 RES_FILE=perf_OPTIMIZE
25
26 #outputs lines of form :
27 #"no. source elems      no. target elems    user time"
28 function test_pair {
29     echo -n $1 | sed 's/\(PerfCyl\)\([0-9]*\)/\2/' | sed 's/\(PerfBoxT\)\([0-9]*\)/\2/' | sed 's/\(PerfBox\)\([0-9]*\)/\2/' >> $RES_FILE
30     echo -n " " >> $RES_FILE
31     echo -n $2 | sed 's/\(PerfCyl\)\([0-9]*\)/\2/' | sed 's/\(PerfBoxT\)\([0-9]*\)/\2/' | sed 's/\(PerfBox\)\([0-9]*\)/\2/' >> $RES_FILE
32     echo -n " " >> $RES_FILE
33     time -o $RES_FILE --append -f"%U" ./PerfTest $1 $2 
34     echo
35 }
36
37 function test_box_box {
38 echo PerfBox PerfBox >> $RES_FILE
39
40 test_pair PerfBox1495 PerfBox1495
41 test_pair PerfBox2506 PerfBox2506
42 test_pair PerfBox5708 PerfBox5708
43 test_pair PerfBox13461 PerfBox13461
44 test_pair PerfBox30808 PerfBox30808
45 test_pair PerfBox47176 PerfBox47176
46
47 test_pair PerfBox1495 PerfBox2506
48 test_pair PerfBox1495 PerfBox5708
49 test_pair PerfBox1495 PerfBox13461
50 test_pair PerfBox1495 PerfBox30808
51 test_pair PerfBox1495 PerfBox47176
52
53 test_pair PerfBox2506 PerfBox5708
54 test_pair PerfBox2506 PerfBox13461
55 test_pair PerfBox2506 PerfBox30808
56 test_pair PerfBox2506 PerfBox47176
57
58 test_pair PerfBox5708 PerfBox13461
59 test_pair PerfBox5708 PerfBox30808
60 test_pair PerfBox5708 PerfBox47176
61
62 test_pair PerfBox13461 PerfBox30808
63 test_pair PerfBox13461 PerfBox47176
64
65 test_pair PerfBox30808 PerfBox47176
66
67 }
68
69 function test_cyl_cyl {
70 echo PerfCyl PerfCyl >> $RES_FILE
71
72 test_pair PerfCyl1047 PerfCyl1047
73 test_pair PerfCyl3020 PerfCyl3020
74 test_pair PerfCyl6556 PerfCyl6556
75 test_pair PerfCyl9766 PerfCyl9766
76 test_pair PerfCyl25745 PerfCyl25745
77 test_pair PerfCyl47601 PerfCyl47601
78
79 test_pair PerfCyl1047 PerfCyl3020
80 test_pair PerfCyl1047 PerfCyl6556
81 test_pair PerfCyl1047 PerfCyl9766
82 test_pair PerfCyl1047 PerfCyl25745
83 test_pair PerfCyl1047 PerfCyl47601
84
85 test_pair PerfCyl3020 PerfCyl6556
86 test_pair PerfCyl3020 PerfCyl9766
87 test_pair PerfCyl3020 PerfCyl25745
88 test_pair PerfCyl3020 PerfCyl47601
89
90 test_pair PerfCyl6556 PerfCyl9766
91 test_pair PerfCyl6556 PerfCyl25745
92 test_pair PerfCyl6556 PerfCyl47601
93
94 test_pair PerfCyl9766 PerfCyl25745
95 test_pair PerfCyl9766 PerfCyl47601
96
97 test_pair PerfCyl25745 PerfCyl47601
98
99 }
100
101 function test_box_cyl {
102     echo PerfBox PerfCyl >> $RES_FILE
103     test_pair PerfBox1495 PerfCyl1047
104     test_pair PerfBox1495 PerfCyl3020
105     test_pair PerfBox1495 PerfCyl6556
106     test_pair PerfBox1495 PerfCyl9766
107     test_pair PerfBox1495 PerfCyl25745
108     test_pair PerfBox1495 PerfCyl47601
109     
110     test_pair PerfBox2506 PerfCyl1047
111     test_pair PerfBox2506 PerfCyl3020
112     test_pair PerfBox2506 PerfCyl6556
113     test_pair PerfBox2506 PerfCyl9766
114     test_pair PerfBox2506 PerfCyl25745
115     test_pair PerfBox2506 PerfCyl47601
116
117     test_pair PerfBox5708 PerfCyl1047
118     test_pair PerfBox5708 PerfCyl3020
119     test_pair PerfBox5708 PerfCyl6556
120     test_pair PerfBox5708 PerfCyl9766
121     test_pair PerfBox5708 PerfCyl25745
122     test_pair PerfBox5708 PerfCyl47601
123
124     test_pair PerfBox13461 PerfCyl1047
125     test_pair PerfBox13461 PerfCyl3020
126     test_pair PerfBox13461 PerfCyl6556
127     test_pair PerfBox13461 PerfCyl9766
128     test_pair PerfBox13461 PerfCyl25745
129     test_pair PerfBox13461 PerfCyl47601
130
131     test_pair PerfBox30808 PerfCyl1047
132     test_pair PerfBox30808 PerfCyl3020
133     test_pair PerfBox30808 PerfCyl6556
134     test_pair PerfBox30808 PerfCyl9766
135     test_pair PerfBox30808 PerfCyl25745
136     test_pair PerfBox30808 PerfCyl47601
137     
138     test_pair PerfBox47176 PerfCyl1047
139     test_pair PerfBox47176 PerfCyl3020
140     test_pair PerfBox47176 PerfCyl6556
141     test_pair PerfBox47176 PerfCyl9766
142     test_pair PerfBox47176 PerfCyl25745
143     test_pair PerfBox47176 PerfCyl47601
144 }
145
146 function test_box_transbox {
147     echo PerfBox PerfBoxT >> $RES_FILE
148     test_pair PerfBox1495 PerfBoxT1493
149     test_pair PerfBox2506 PerfBoxT2676
150     test_pair PerfBox5708 PerfBoxT5717
151     test_pair PerfBox13461 PerfBoxT12469
152     test_pair PerfBox30808 PerfBoxT29019
153     test_pair PerfBox47176 PerfBoxT47278
154 }
155     
156
157     
158 #functions to execute :     
159
160 echo PerfTest execution on `date` > $RES_FILE
161 test_box_cyl
162 test_box_box
163 test_cyl_cyl
164 test_box_transbox
165
166 cat $RES_FILE