forked from marklemay/GraphAutomata
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·65 lines (56 loc) · 1.54 KB
/
run.sh
File metadata and controls
executable file
·65 lines (56 loc) · 1.54 KB
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
#!/bin/bash
set -x
# input_dir=$1
# cd $input_dir
output_dir="/home/wajih/dataset/ftp"
mkdir -p $output_dir
neo_dir="/home/wajih/neo4j-community-3.0.3/data/databases/graph.db"
graph_auto_dir="/home/wajih/GraphAutomata/"
spade_dir="/home/wajih/SPADE/"
stat_dir="/tmp/time_stat.csv"
rm $stat_dir
prev_size=0
prev_time=0
for i in 50 100 150 200 250 300 350;
do
cd $spade_dir
./run-spade.sh
cd -
sleep 5
ftpbench -h 127.0.0.1 -u wajih -p motoracer upload workdir/ -c 1 -s 1 --maxrun=10 &
sleep $i
killall -09 ftpbench
/home/wajih/SPADE/bin/spade stop
sleep 10
rm -rf $neo_dir/*
cp -R /tmp/spade.graph_db/* $neo_dir/
/home/wajih/neo4j-community-3.0.3/bin/neo4j stop
sleep 5
/home/wajih/neo4j-community-3.0.3/bin/neo4j start
sleep 10
cd $graph_auto_dir
mvn test -Dtest=TestNeoGraphs#learnNeo4j
i_now_size=`cat stats.csv | grep 'i-size-bytes' | cut -d, -f2`
f_now_size=`cat stats.csv | grep 'f-size-bytes' | cut -d, -f2`
now_time=`cat stats.csv | grep 'total-time' | cut -d, -f2`
inc_time=$(echo "$now_time - $prev_time" | bc)
prev_time=$now_time
echo "$i,$i_now_size,$inc_time,$f_now_size," >> $stat_dir
cd -
done
exit
for i in `ls $input_dir`; do
neo4j stop
sleep 10
data_set_dir=$input_dir/$i/
rm -rf $neo_dir/*
cp -R $data_set_dir/* $neo_dir/
neo4j start
sleep 20
cd $graph_auto_dir
mvn test -Dtest=TestNeoGraphs#learnNeo4j
mkdir -p $output_dir/$i/
cp stats.csv $output_dir/$i/
cp time_cost.csv $output_dir/$i/
cd -
done