-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (39 loc) · 1.05 KB
/
Makefile
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
# Benchmark Configuration
PLATFORM ?= fdw
SCENARIO ?= insert
DATASOURCE ?= lineitem.tbl
DATASIZE ?= 1 # GB
DBPATH ?= /tmp/vidardb_engine_benchmark
# PG Configuration
PGHOST ?= 127.0.0.1
PGPORT ?= 5432
PGDATABASE ?= postgres
PGUSER ?= postgres
# Build Configuration
CXX ?= c++
WCXXFLAGS = -Wno-deprecated-declarations
CXXFLAGS = -I/usr/local/include -I/usr/include -lpqxx -lpq -lvidardb $(WCXXFLAGS)
CXXFLAGS += ${EXTRA_CXXFLAGS} -O2
.PHONY: all
all: benchmark
.PHONY: benchmark
benchmark:
$(CXX) src/benchmark.cc $(CXXFLAGS) -o benchmark
.PHONY: clean
clean:
rm -rf benchmark
# install tpch
.PHONY: install-tpch
install-tpch:
./benchmark.sh install_tpch
# generate tpch data
.PHONY: gen-data
gen-data:
./benchmark.sh gen_data $(DATASIZE) $(DATASOURCE)
# run benchmark
.PHONY: run-benchmark
run-benchmark: clean all install-tpch
PLATFORM=$(PLATFORM) SCENARIO=$(SCENARIO) DATASOURCE=$(DATASOURCE) \
DATASIZE=$(DATASIZE) DBPATH=$(DBPATH) PGHOST=$(PGHOST) PGPORT=$(PGPORT) \
PGDATABASE=$(PGDATABASE) PGUSER=$(PGUSER) \
./benchmark.sh run_benchmark $(PLATFORM)