forked from basho/basho_bench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
88 lines (65 loc) · 2.31 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
REPO ?= basho_bench
PKG_REVISION ?= $(shell git describe --tags)
PKG_VERSION ?= $(shell git describe --tags | tr - .)
PKG_ID = basho-bench-$(PKG_VERSION)
PKG_BUILD = 1
BASE_DIR = $(shell pwd)
ERLANG_BIN = $(shell dirname $(shell which erl))
REBAR ?= $(BASE_DIR)/rebar
OVERLAY_VARS ?=
all: deps compile
./rebar skip_deps=true escriptize
.PHONY: deps compile rel
rel: deps compile
cd rel && ../rebar generate skip_deps=true $(OVERLAY_VARS)
deps:
./rebar get-deps
compile: deps
# Temp hack to work around https://github.com/basho/riak-erlang-client/issues/151
(cd deps/riak_pb ; ./rebar clean compile deps_dir=..)
@(./rebar compile)
clean:
@./rebar clean
distclean: clean
@rm -rf basho_bench deps
results:
Rscript --vanilla priv/summary.r -i tests/current
ops_sec-results: results
byte_sec-results:
Rscript --vanilla priv/summary.r --ylabel1stgraph byte/sec -i tests/current
kb_sec-results:
Rscript --vanilla priv/summary.r --ylabel1stgraph KB/sec -i tests/current
kib_sec-results:
Rscript --vanilla priv/summary.r --ylabel1stgraph KiB/sec -i tests/current
mb_sec-results:
Rscript --vanilla priv/summary.r --ylabel1stgraph MB/sec -i tests/current
mib_sec-results:
Rscript --vanilla priv/summary.r --ylabel1stgraph MiB/sec -i tests/current
TARGETS := $(shell ls tests/ | grep -v current)
JOBS := $(addprefix job,${TARGETS})
.PHONY: all_results ${JOBS}
all_results: ${JOBS} ; echo "$@ successfully generated."
${JOBS}: job%: ; Rscript --vanilla priv/summary.r -i tests/$*
##
## Packaging targets
##
.PHONY: package
export PKG_VERSION PKG_ID PKG_BUILD BASE_DIR ERLANG_BIN REBAR OVERLAY_VARS RELEASE
package.src: deps
mkdir -p package
rm -rf package/$(PKG_ID)
git archive --format=tar --prefix=$(PKG_ID)/ $(PKG_REVISION)| (cd package && tar -xf -)
${MAKE} -C package/$(PKG_ID) deps
for dep in package/$(PKG_ID)/deps/*; do \
echo "Processing dep: $${dep}"; \
mkdir -p $${dep}/priv; \
git --git-dir=$${dep}/.git describe --always --tags >$${dep}/priv/vsn.git; \
done
find package/$(PKG_ID) -depth -name ".git" -exec rm -rf {} \;
tar -C package -czf package/$(PKG_ID).tar.gz $(PKG_ID)
dist: package.src
cp package/$(PKG_ID).tar.gz .
package: package.src
${MAKE} -C package -f $(PKG_ID)/deps/node_package/Makefile
pkgclean: distclean
rm -rf package