Skip to content

Commit 9921830

Browse files
committed
ci: fix bench target
1 parent a3151af commit 9921830

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

‎Makefile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ $(BUILD_DIR)/$(EXTENSION).$(SHARED_EXT): $(EXTENSION).$(SHARED_EXT)
7272
mv $? $@
7373

7474
$(BENCH_DATA_DIR)/customers-1000000.csv: $(BENCH_DATA_DIR)/customers-1000000.7z
75-
7z e -y $< -o$(BENCH_DATA_DIR) $(notdir $@)
75+
7z e -y $< -o$(BENCH_DATA_DIR) >&2
76+
test -s $@
7677
# needed to not decompress everytime, 7z preserves archive original timestamp and that trips up make
7778
touch $@
7879

‎shell.nix‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,18 @@ mkShellNoCC {
2626
2727
pg_ver=$1
2828
29-
make bench > /dev/null
29+
make bench >&2
30+
31+
csv_path="$PWD/bench/data/customers-1000000.csv"
32+
# TODO for some reason the above make bench is not making the data file available
33+
if [ ! -r "$csv_path" ]; then
34+
7z e -y bench/data/customers-1000000.7z \
35+
-obench/data >&2
36+
fi
37+
if [ ! -s "$csv_path" ]; then
38+
echo "pg_csv-bench: benchmark CSV was not created or is empty: $csv_path" >&2
39+
exit 1
40+
fi
3041
3142
for file in ./bench/*.sql; do
3243
@@ -35,10 +46,6 @@ mkShellNoCC {
3546
fi
3647
3748
duration=30
38-
if [ "$file" = ./bench/native_copy.sql ] ||
39-
[ "$file" = ./bench/csv_read.sql ]; then
40-
duration=120
41-
fi
4249
4350
cat <<EOF
4451

0 commit comments

Comments
 (0)