Skip to content

Commit d43913d

Browse files
[Util] Move utilities into designated directory.
1 parent 5d2a74d commit d43913d

9 files changed

+13
-120
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ report:coverage:
398398
- nginx
399399
needs: [ "build:debug:linux-amd64" ]
400400
script:
401-
- ./coverage.sh
401+
- utils/coverage.sh
402402
- rm -rf /srv/http/mutable/coverage
403403
- mv build/${BUILD_TYPE}/html /srv/http/mutable/coverage
404404
coverage: '/lines\.+: \d+\.\d+/'

run.sh

Lines changed: 0 additions & 111 deletions
This file was deleted.
File renamed without changes.

eval-information-value.sh renamed to utils/eval-heuristic_search-heuristic_information_value.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ trap "exit 1" SIGINT
55

66
set -o pipefail -o nounset
77

8-
source planner-configs.sh
8+
source utils/eval-plan_enumerator-configs.sh
99

1010
BINDIR=build/debug_shared/bin
1111
BIN=${BINDIR}/shell
@@ -34,7 +34,7 @@ do
3434
for N in 15; do
3535
NAME="$T-${N}"
3636

37-
python3 querygen.py -t $T -n ${N} > /dev/null
37+
python3 utils/querygen.py -t $T -n ${N} > /dev/null
3838
build/release/bin/cardinality_gen \
3939
--seed ${RANDOM} \
4040
"${NAME}.schema.sql" \
File renamed without changes.

eval-planners.sh renamed to utils/eval-plan_enumerators.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ trap "exit 1" SIGINT
55

66
set -o pipefail -o nounset
77

8-
source planner-configs.sh
9-
8+
source utils/eval-plan_enumerator-configs.sh
109

1110
########################################################################################################################
1211
# Globals
@@ -207,7 +206,7 @@ do
207206
# Generate problem
208207
SEED=${RANDOM}
209208
echo -n '` '
210-
python3 querygen.py -t "${TOPOLOGY}" -n ${N} --count=${QUERY_REPEAT_COUNT} | tr -d '\n'
209+
python3 utils/querygen.py -t "${TOPOLOGY}" -n ${N} --count=${QUERY_REPEAT_COUNT} | tr -d '\n'
211210
(time build/release/bin/cardinality_gen \
212211
${FLAGS} \
213212
--seed "${SEED}" \

eval-states-generated.sh renamed to utils/eval-states-generated.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ BIN=build/debug_shared/bin/shell
1616
MIN_CARDINALITY=10
1717
MAX_CARDINALITY=10000
1818

19+
echo "planner,topology,relations,states"
20+
1921
for T in {chain,cycle,star,clique};
2022
do
2123
for N in {5,10,15};
2224
do
2325
NAME="$T-$N"
2426

25-
python3 querygen.py -t $T -n $N > /dev/null
27+
python3 utils/querygen.py -t $T -n $N > /dev/null
2628
build/release/bin/cardinality_gen \
2729
--min ${MIN_CARDINALITY} \
2830
--max ${MAX_CARDINALITY} \

eval-thinned_clique.sh renamed to utils/eval-thinned_clique.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function run_experiment()
6060
SKEWNESS=$3
6161
SEED=$4
6262

63-
OUT=$(python querygen.py --quiet --seed ${SEED} -t clique -n ${SIZE} --thinning=${THINNING} --skew=${SKEWNESS})
63+
OUT=$(python utils/querygen.py --quiet --seed ${SEED} -t clique -n ${SIZE} --thinning=${THINNING} --skew=${SKEWNESS})
6464
RES=$?
6565
# echo "${OUT}"
6666
if [ ${RES} -ne 0 ];

querygen.py renamed to utils/querygen.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!env python3
22

3+
import os
4+
5+
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # silence TnesorFlow INFO and WARNING messages
6+
37
import argparse
48
import easygraph as eg
59
import enum
@@ -9,7 +13,6 @@
913
import itertools
1014
import math
1115
import numpy
12-
import os
1316
import platform
1417
import random
1518
import scipy

0 commit comments

Comments
 (0)