Skip to content

Commit a5814fa

Browse files
committed
eval: Fix indentation and simplify loops
1 parent 637d4c1 commit a5814fa

File tree

5 files changed

+34
-32
lines changed

5 files changed

+34
-32
lines changed

eval/filesearch/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ if ! "$BASE_DIR/utils/enable-mglru.sh"; then
4040
fi
4141

4242
# MGLRU
43+
# TODO: Remove --policy-loader requirement when using --default-only
4344
python3 "$BENCH_PATH/bench_filesearch.py" \
4445
--cpu 8 \
4546
--policy-loader "$POLICY_PATH/cache_ext_mru.out" \

eval/get-scan/run.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ python3 "$BENCH_PATH/bench_leveldb.py" \
4242
--results-file "$RESULTS_PATH/get_scan_results.json" \
4343
--leveldb-db "$DB_PATH" \
4444
--fadvise-hints ",SEQUENTIAL,NOREUSE,DONTNEED" \
45-
--iterations "$ITERATIONS" \
46-
--bench-binary-dir "$YCSB_PATH/build" \
45+
--iterations "$ITERATIONS" \
46+
--bench-binary-dir "$YCSB_PATH/build" \
4747
--benchmark mixed_get_scan
4848

4949
# Enable MGLRU
@@ -53,14 +53,15 @@ if ! "$BASE_DIR/utils/enable-mglru.sh"; then
5353
fi
5454

5555
# MGLRU
56+
# TODO: Remove --policy-loader requirement when using --default-only
5657
python3 "$BENCH_PATH/bench_leveldb.py" \
5758
--cpu 8 \
5859
--policy-loader "$POLICY_PATH/cache_ext_get_scan.out" \
5960
--results-file "$RESULTS_PATH/get_scan_results_mglru.json" \
6061
--leveldb-db "$DB_PATH" \
6162
--fadvise-hints "" \
62-
--iterations "$ITERATIONS" \
63-
--bench-binary-dir "$YCSB_PATH/build" \
63+
--iterations "$ITERATIONS" \
64+
--bench-binary-dir "$YCSB_PATH/build" \
6465
--benchmark mixed_get_scan \
6566
--default-only
6667

eval/isolation/run.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ if ! "$BASE_DIR/utils/disable-mglru.sh"; then
3636
exit 1
3737
fi
3838

39+
# TODO: Convert the following to a loop
40+
3941
python3 "$BENCH_PATH/bench_per_cgroup.py" \
4042
--cpu 8 \
4143
--search-path "$SEARCH_PATH" \

eval/twitter/run.sh

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ for POLICY in "${POLICIES[@]}"; do
5858
--iterations "$ITERATIONS" \
5959
--bench-binary-dir "$YCSB_PATH/build" \
6060
--twitter-traces-dir "$DB_DIRS/twitter-traces" \
61-
--benchmark twitter_cluster${CLUSTER}_bench
61+
--benchmark "twitter_cluster${CLUSTER}_bench"
6262
done
6363
done
6464

@@ -71,20 +71,19 @@ fi
7171
# MGLRU
7272
# TODO: Get rid of the CLUSTER loop and pass a comma-separated list of benchmarks
7373
# We already support this in the bench script.
74-
for POLICY in "${POLICIES[@]}"; do
75-
for CLUSTER in "${CLUSTERS[@]}"; do
76-
echo "Running policy: ${POLICY} on cluster ${CLUSTER}"
77-
python3 "$BENCH_PATH/bench_twitter_trace.py" \
78-
--cpu 8 \
79-
--policy-loader ./${POLICY}.out \
80-
--results-file "$RESULTS_PATH/twitter_traces_${CLUSTER}_results_mglru.json" \
81-
--leveldb-db "$DB_DIRS/leveldb_twitter_cluster${CLUSTER}_db" \
82-
--iterations "$ITERATIONS" \
83-
--bench-binary-dir "$YCSB_PATH/build" \
84-
--twitter-traces-dir "$DB_DIRS/twitter-traces" \
85-
--benchmark twitter_cluster${CLUSTER}_bench \
86-
--default-only
87-
done
74+
# TODO: Remove --policy-loader requirement when using --default-only
75+
for CLUSTER in "${CLUSTERS[@]}"; do
76+
echo "Running baseline MGLRU on cluster ${CLUSTER}"
77+
python3 "$BENCH_PATH/bench_twitter_trace.py" \
78+
--cpu 8 \
79+
--policy-loader "$POLICY_PATH/${POLICIES[0]}.out" \
80+
--results-file "$RESULTS_PATH/twitter_traces_${CLUSTER}_results_mglru.json" \
81+
--leveldb-db "$DB_DIRS/leveldb_twitter_cluster${CLUSTER}_db" \
82+
--iterations "$ITERATIONS" \
83+
--bench-binary-dir "$YCSB_PATH/build" \
84+
--twitter-traces-dir "$DB_DIRS/twitter-traces" \
85+
--benchmark "twitter_cluster${CLUSTER}_bench" \
86+
--default-only
8887
done
8988

9089
# Disable MGLRU

eval/ycsb/run.sh

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,18 @@ if ! "$BASE_DIR/utils/enable-mglru.sh"; then
6464
fi
6565

6666
# MGLRU
67-
for POLICY in "${POLICIES[@]}"; do
68-
echo "Running policy: ${POLICY}"
69-
python3 "$BENCH_PATH/bench_leveldb.py" \
70-
--cpu 8 \
71-
--policy-loader "$POLICY_PATH/${POLICY}.out" \
72-
--results-file "$RESULTS_PATH/ycsb_results_mglru.json" \
73-
--leveldb-db "$DB_PATH" \
74-
--fadvise-hints "" \
75-
--iterations "$ITERATIONS" \
76-
--bench-binary-dir "$YCSB_PATH/build" \
77-
--benchmark ycsb_a,ycsb_b,ycsb_c,ycsb_d,ycsb_e,ycsb_f,uniform,uniform_read_write \
78-
--default-only
79-
done
67+
# TODO: Remove --policy-loader requirement when using --default-only
68+
echo "Running baseline MGLRU"
69+
python3 "$BENCH_PATH/bench_leveldb.py" \
70+
--cpu 8 \
71+
--policy-loader "$POLICY_PATH/${POLICY}.out" \
72+
--results-file "$RESULTS_PATH/ycsb_results_mglru.json" \
73+
--leveldb-db "$DB_PATH" \
74+
--fadvise-hints "" \
75+
--iterations "$ITERATIONS" \
76+
--bench-binary-dir "$YCSB_PATH/build" \
77+
--benchmark ycsb_a,ycsb_b,ycsb_c,ycsb_d,ycsb_e,ycsb_f,uniform,uniform_read_write \
78+
--default-only
8079

8180
# Disable MGLRU
8281
if ! "$BASE_DIR/utils/disable-mglru.sh"; then

0 commit comments

Comments
 (0)