forked from imkira/go-loggers-bench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (22 loc) · 861 Bytes
/
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
GOTEST_FLAGS=-cpu=1,2,4 -benchmem -benchtime=5s
TEXT_PKGS=Gokit Logrus Log15 Gologging Seelog Zerolog Zap
JSON_PKGS=Gokit Logrus Log15 Zerolog Zap
TEXT_PKG_TARGETS=$(addprefix test-text-,$(TEXT_PKGS))
JSON_PKG_TARGETS=$(addprefix test-json-,$(JSON_PKGS))
.PHONY: all deps test test-text test-json $(TEXT_PKG_TARGETS) $(JSON_PKG_TARGETS)
all: deps test
deps:
go get -u github.com/Sirupsen/logrus
go get -u gopkg.in/inconshreveable/log15.v2
go get -u github.com/op/go-logging
go get -u github.com/cihub/seelog
go get -u github.com/go-kit/kit/log
go get -u github.com/rs/zerolog
go get -u go.uber.org/zap
test: test-text test-json
test-text: $(TEXT_PKG_TARGETS)
$(TEXT_PKG_TARGETS): test-text-%:
go test $(GOTEST_FLAGS) -bench "$*.*Text"
test-json: $(JSON_PKG_TARGETS)
$(JSON_PKG_TARGETS): test-json-%:
go test $(GOTEST_FLAGS) -bench "$*.*JSON"