source: examples/scaling_tests/daisychain/likes_python/run_one @ 2b4e740

mei_rt2mei_rt2_fix_1
Last change on this file since 2b4e740 was 2b4e740, checked in by Mei <mei@…>, 12 years ago

1) test out the performance plotting build

  • Property mode set to 100755
File size: 1.0 KB
Line 
1#!/bin/sh
2
3noise=$1
4
5if [ -z "$noise" ]; then
6    exit
7fi 
8
9echo "---running daisychain likes_python $noise scaling"
10
11rm -rf likes_$noise
12mkdir likes_$noise
13sed "s/#VAL#/$noise/" base/SETUP.py > likes_$noise/setup.py
14sed "s/#VAL#/$noise/" base/QUERY.py > likes_$noise/query.py
15sed "s/#VAL#/$noise/" base/ATTR.py > likes_$noise/attr.py
16
17cd likes_$noise
18chmod +x setup.py attr.py query.py
19./setup.py 1> /dev/null 2>&1
20env keystore=`pwd` ./attr.py 1> attr.log 2>& 1
21
22env keystore=`pwd` ABAC_CN=1 ./query.py 1>likes.tmp 2> likes.time
23
24if [ $noise -eq 0 ] ; then
25    result=`egrep -c "YAP query succeed" likes.tmp 2>/dev/null`
26    if [ $result -eq 22 ]; then
27       echo "   PASSED"
28## zap out all those fake BADs
29       sed -i 's/BAD_/fakebad_/g' likes.time
30       exit 0
31    else 
32       echo "   ERROR"
33       exit 1
34    fi
35fi
36
37s=`grep -c "YAP query succeed" likes.tmp 2>/dev/null`
38f=`grep -c "YAP query failed" likes.tmp 2>/dev/null `
39if [ $s -ne 11 ] ; then
40    echo "   ERROR"
41    exit 1
42fi
43
44if [ $f  -ne 11 ] ; then
45    echo "   ERROR"
46    exit 1
47fi
48
49echo "   PASSED"
50
Note: See TracBrowser for help on using the repository browser.