-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.sh
138 lines (113 loc) · 4.55 KB
/
script.sh
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
#!/bin/sh
export COMUNICA_TIMEOUT=60
export DATASOURCE_LDES=http://localhost:8080/0.ttl
export DATASOURCE_DATADUMP=http://localhost:8080/data.ttl
export DATASOURCE_METADATA=http://localhost:8080/metadata.ttl
export FRAGMENTATION_NAME="undefined_"
export CONFIG_NAME="undefined"
export NUMBER_REPETITION=20
export MODE="undefined"
export SPACE_SIZE=9000
export DATASET_NAME="undefined"
function startDataSourceDahcc1PDataDump {
touch ./evaluation/server_log
: > ./evaluation/server_log
FRAGMENTATION_NAME="datadump_1_participant_dahcc"
DATASET_NAME="Dahcc1P"
npx http-server evaluation/data/dahcc_1_participant -p 8080 >/dev/null &> ./evaluation/server_log &
if [ $1 = 1 ] ; then
touch ./evaluation/sparql_comunica_log
unset COMUNICA_CONFIG
: > ./evaluation/sparql_comunica_log
#createSPARQLEnpoint &> ./evaluation/sparql_comunica_log
exit 0
fi
}
function startDataSourceDahcc1PLDEServer {
touch ./evaluation/server_log
: > ./evaluation/server_log
DATASET_NAME="Dahcc1P"
cp ./evaluation/data/dahcc_1_participant/metadata.ttl ./evaluation/data/dahcc_1_participant_ldes/metadata.ttl
npx http-server ./evaluation/data/dahcc_1_participant_ldes -p 8080 >/dev/null &> ./evaluation/server_log &
if [ $1 = 1 ] ; then
touch ./evaluation/sparql_comunica_log
: > ./evaluation/sparql_comunica_log
createSPARQLLTQTEnpoint &> ./evaluation/sparql_comunica_log
exit 0
fi
}
function startLDESOneAry100FragmentDataSourceDahcc1P {
export n=100
export f=oneAryTree
FRAGMENTATION_NAME="${f}${n}"
mkdir -p ./evaluation/data/dahcc_1_participant_ldes
./TREE-datadump-injestor/target/release/data-dump-to-tree -n $n -d ./evaluation/data/dahcc_1_participant/data.ttl -c ./TREE-datadump-injestor/config.json -o ./evaluation/data/dahcc_1_participant_ldes -f $f
startDataSourceDahcc1PLDEServer $1
}
function startLDESOneAry1000FragmentDataSourceDahcc1P {
export n=1000
export f=oneAryTree
FRAGMENTATION_NAME="${f}${n}"
mkdir -p ./evaluation/data/dahcc_1_participant_ldes
./TREE-datadump-injestor/target/release/data-dump-to-tree -n $n -d ./evaluation/data/dahcc_1_participant/data.ttl -c ./TREE-datadump-injestor/config.json -o ./evaluation/data/dahcc_1_participant_ldes -f $f
startDataSourceDahcc1PLDEServer $1
}
function startLDESLinkedList1000FragmentDataSourceDahcc1P {
export n=1000
export f=linkedList
FRAGMENTATION_NAME="${f}${n}"
mkdir -p ./evaluation/data/dahcc_1_participant_ldes
./TREE-datadump-injestor/target/release/data-dump-to-tree -n $n -c ./TREE-datadump-injestor/config.json -o ./evaluation/data/dahcc_1_participant_ldes -f $f
startDataSourceDahcc1PLDEServer $1
}
function liberateSPARQLEndpointPort {
(fuser -k 5000/tcp || true)
}
function liberateDataHostingPort {
(fuser -k 8080/tcp || true)
}
function createNewOutputFile {
touch ./evaluation/output
: > ./evaluation/output
}
function createSPARQLEnpoint {
#export NODE_OPTIONS="--max-old-space-size=3000"
#comunica-sparql-http $DATASOURCE_DATADUMP $DATASOURCE_METADATA -p 3000 -t $COMUNICA_TIMEOUT -i -w 3
#unset NODE_OPTIONS
node --max-old-space-size=8000 comunica/engines/query-sparql/bin/http.js $DATASOURCE_DATADUMP $DATASOURCE_METADATA -p 3000 -t $COMUNICA_TIMEOUT -i -w 1
}
function createSPARQLLTQTEnpoint {
node --max-old-space-size=8000 ./comunica-feature-link-traversal/engines/query-sparql-link-traversal/bin/http.js $DATASOURCE_LDES $DATASOURCE_METADATA -p 3000 -i -l info -w 1 -t $COMUNICA_TIMEOUT --freshWorker --lenient
}
function runEvaluation {
node ./evaluation.mjs -n $NUMBER_REPETITION -t $FRAGMENTATION_NAME -m $MODE -s $SPACE_SIZE --timeout $COMUNICA_TIMEOUT --dataset-name $DATASET_NAME
}
function protoEvaluation {
createNewOutputFile
echo $MODE
runEvaluation
}
function evaluationFollowTree {
export MODE="TREE"
protoEvaluation
}
function evaluationFollowTreeSolver {
export MODE="TREE-GUIDED"
protoEvaluation
}
function evaluationDataDump {
export MODE="DATA-DUMP"
protoEvaluation
}
function downloadDahcc1ParticipantDataset {
curl https://dahcc.idlab.ugent.be/data/data_kg/dataset_participant31.nt.gz > ./evaluation/data/dahcc_1_participant/archive.nt.gz
gzip -d -c ./evaluation/data/dahcc_1_participant/archive.nt.gz > ./evaluation/data/dahcc_1_participant/data.ttl
rm ./evaluation/data/dahcc_1_participant/archive.nt.gz
}
function installTreeDataDumpInjestor {
cd ./TREE-datadump-injestor && cargo build --release
cd ..
}
function usage {
cat usage
}