<commit_before>all: test

init:
	go get -u github.com/AlekSi/gocoverutil
	go get -u gopkg.in/alecthomas/gometalinter.v1
	gometalinter.v1 --install

protos:
	go install -v ./vendor/github.com/golang/protobuf/protoc-gen-go
	rm -f prompb/*.pb.go
	protoc -Iprompb prompb/*.proto --go_out=prompb

install:
	go install -v ./...

install-race:
	go install -v -race ./...

test: install
	go test -v ./...

test-race: install-race
	go test -v -race ./...

bench: install
	go test -bench=. -benchtime=10s -benchmem -v ./...

run: install
	promhouse -debug

run-race: install-race
	promhouse -debug

cover: install
	gocoverutil test -v -covermode=count ./...

check: install
	-gometalinter.v1 --tests --deadline=180s ./...

env-run:
	docker-compose -f misc/docker-compose.yml -p promhouse up

env-stop:
	docker-compose -f misc/docker-compose.yml -p promhouse stop

env-run-mac:
	docker-compose -f misc/docker-compose-mac.yml -p promhouse up

env-stop-mac:
	docker-compose -f misc/docker-compose-mac.yml -p promhouse stop

clickhouse-client:
	docker exec -ti -u root promhouse_clickhouse_1 /usr/bin/clickhouse --client<commit_msg>Specify database name.<commit_after>all: test

init:
	go get -u github.com/AlekSi/gocoverutil
	go get -u gopkg.in/alecthomas/gometalinter.v1
	gometalinter.v1 --install

protos:
	go install -v ./vendor/github.com/golang/protobuf/protoc-gen-go
	rm -f prompb/*.pb.go
	protoc -Iprompb prompb/*.proto --go_out=prompb

install:
	go install -v ./...

install-race:
	go install -v -race ./...

test: install
	go test -v ./...

test-race: install-race
	go test -v -race ./...

bench: install
	go test -bench=. -benchtime=10s -benchmem -v ./...

run: install
	promhouse -debug

run-race: install-race
	promhouse -debug

cover: install
	gocoverutil test -v -covermode=count ./...

check: install
	-gometalinter.v1 --tests --deadline=180s ./...

env-run:
	docker-compose -f misc/docker-compose.yml -p promhouse up

env-stop:
	docker-compose -f misc/docker-compose.yml -p promhouse stop

env-run-mac:
	docker-compose -f misc/docker-compose-mac.yml -p promhouse up

env-stop-mac:
	docker-compose -f misc/docker-compose-mac.yml -p promhouse stop

clickhouse-client:
	docker exec -ti -u root promhouse_clickhouse_1 /usr/bin/clickhouse --client --database=prometheus
{'fraction_non_alphanumeric': 0.14203793559770622, 'fraction_numerical': 0.007940008822232024, 'mean_word_length': 2.9581151832460733, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2413062', 'n_tokens_mistral': 940, 'n_tokens_neox': 874, 'n_words': 220}