-
Notifications
You must be signed in to change notification settings - Fork 78
/
Makefile
67 lines (49 loc) · 1.96 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
VALGRIND_OPTS = --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes -v
default: build
.PHONY: build
build:
node-gyp build
.PHONY: test
test: build
npm test
.PHONY: empty-valgrind
empty-valgrind: build
mkdir -p valgrind
valgrind $(VALGRIND_OPTS) node -e "" 1>valgrind/empty.out 2>valgrind/empty.valgrind
.PHONY: test-valgrind
test-valgrind: build
mkdir -p valgrind
valgrind $(VALGRIND_OPTS) npm test 1>valgrind/test.out 2>valgrind/test.valgrind
.PHONY: benchmark-valgrind
benchmark-valgrind: build
mkdir -p valgrind
valgrind $(VALGRIND_OPTS) node benchmarks/main.js -O 10000 -P 4 -R 0.5 1>valgrind/benchmark.out 2>valgrind/benchmark.valgrind
.PHONY: put-valgrind
put-valgrind: build
mkdir -p valgrind
valgrind $(VALGRIND_OPTS) node examples/put.js -q -I 100 foo 1>valgrind/put-100.out 2>valgrind/put-100.valgrind
.PHONY: put
put: build
node examples/put.js -q -I 100 foo
.PHONY: get-valgrind
get-valgrind: build
mkdir -p valgrind
valgrind $(VALGRIND_OPTS) node examples/get.js -q -I 100 foo 1>valgrind/get-100.out 2>valgrind/get-100.valgrind
.PHONY: get
get: build
node examples/get.js -q -I 100 foo
.PHONY: query-valgrind
query-valgrind: build
mkdir -p valgrind
node examples/index_create.js s idx_s string
# valgrind $(VALGRIND_OPTS) node examples/query.js -I 1 1>valgrind/query-1.out 2>valgrind/query-1.valgrind
valgrind $(VALGRIND_OPTS) node --expose-gc examples/query.js -q -I 100 1>valgrind/query-100.out 2>valgrind/query-100.valgrind
# valgrind $(VALGRIND_OPTS) node examples/query.js -I 1000 1>valgrind/query-1000.out 2>valgrind/query-1000.valgrind
# valgrind $(VALGRIND_OPTS) node examples/query.js -I 10000 1>valgrind/query-10000.out 2>valgrind/query-10000.valgrind
.PHONY: query
query: build
node examples/index_create.js s idx_s string
# node --expose-gc examples/query.js -I 1
# node --expose-gc examples/query.js -I 100
node --expose-gc examples/query.js -q -I 1000
# node --expose-gc examples/query.js -I 10000