source: trunk/playground/isidorus_test.sh

Last change on this file was 328, checked in by lgiessmann, 14 years ago

fixed ticket #75 --> changed license terms from LGPL to LLGPL in the trunk tree

  • Property svn:executable set to *
File size: 2.5 KB
Line 
1#!/bin/bash
2
3#+-----------------------------------------------------------------------------
4#+  Isidorus
5#+  (c) 2008-2010 Marc Kuester, Christoph Ludwig, Lukas Georgieff
6#+
7#+  Isidorus is freely distributable under the LLGPL license.
8#+  You can find a detailed description in trunk/docs/LLGPL-LICENSE.txt and
9#+  trunk/docs/LGPL-LICENSE.txt.
10#+-----------------------------------------------------------------------------
11
12
13host="http://192.168.0.6:8000";
14
15wDir="isidorus_test";
16resDir="results"
17logDir="logfiles"
18
19T="true";
20Nil="false";
21
22doReq1=$T;
23doReq2=$T;
24doReq3=$T;
25doReq4=$T;
26
27dir1="req1";
28dir2="req2";
29dir3="req3";
30dir4="req4";
31
32req1=$host"/isidorus/json/psis/";
33req2=$host"/isidorus/json/get/http://textgrid.org/serviceregistry/development/webpublish"
34req3=$host"/isidorus/json/tmcl/types/"
35req4=$host"/isidorus/json/topicstubs/http://textgrid.org/serviceregistry/development/webpublish"
36
37log1=$logDir"/"$dir1"/iteration_";
38log2=$logDir"/"$dir2"/iteration_";
39log3=$logDir"/"$dir3"/iteration_";
40log4=$logDir"/"$dir4"/iteration_";
41
42res1=$resDir"/"$dir1"/iteration_";
43res2=$resDir"/"$dir2"/iteration_";
44res3=$resDir"/"$dir3"/iteration_";
45res4=$resDir"/"$dir4"/iteration_";
46
47function flow {
48    echo "==== iteration: ${1} ====";
49    counter=$1;
50    if [ $1 -lt 10 ]; then
51        counter="0000"$1;
52    else
53        if [ $1 -lt 100 ]; then
54            counter="000"$1;
55        else
56            if [ $1 -lt 1000 ]; then
57                counter="00"$1;
58            else
59                if [ $1 -lt 10000 ]; then
60                    counter="0"$1;
61                fi
62            fi
63        fi
64    fi
65
66
67    if [ $doReq1 == $T ]; then
68        path1=$log1$counter;
69        result1=$res1$counter;
70        wget -o $path1".log" -O $result1".res" $req1;
71    fi
72
73    if [ $doReq2 == $T ]; then
74        path2=$log2$counter;
75        result2=$res2$counter;
76        wget -o $path2".log" -O $result2".res" $req2;
77    fi
78
79    if [ $doReq3 == $T ]; then
80        path3=$log3$counter;
81        result3=$res3$counter;
82        wget -o $path3".log" -O $result3".res" $req3;
83    fi
84
85    if [ $doReq4 == $T ]; then
86        path4=$log4$counter;
87        result4=$res4$counter;
88        wget -o $path4".log" -O $result4".res" $req4;
89    fi
90}
91
92
93function init {
94    mkdir $wDir;
95    cd $wDir;
96
97    if [ $doReq1 == $T ]; then
98        mkdir -p $logDir"/"$dir1;
99        mkdir -p $resDir"/"$dir1;
100    fi
101
102    if [ $doReq2 == $T ]; then
103        mkdir -p $logDir"/"$dir2;
104        mkdir -p $resDir"/"$dir2;
105    fi
106
107    if [ $doReq3 == $T ]; then
108        mkdir -p $logDir"/"$dir3;
109        mkdir -p $resDir"/"$dir3;
110    fi
111
112    if [ $doReq4 == $T ]; then
113        mkdir -p $logDir"/"$dir4;
114        mkdir -p $resDir"/"$dir4;
115    fi
116}
117
118
119
120function main {
121    init;
122   
123    for i in `seq 1 200000`; do
124        flow $i;
125    done
126}
127
128
129
130main;
Note: See TracBrowser for help on using the repository browser.