-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (31 loc) · 1.56 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
example_common:
go run ./examples/common -debug
example_custom_field_time:
go run ./examples/custom-field-time -debug
example_wrap_query_builder:
go run ./examples/wrap-query-builder -debug
example: example_common example_custom_field_time example_wrap_query_builder
run_test:
go test -v -race -covermode=atomic -coverprofile=coverage.out -coverpkg=./... ./... && echo "Tests finished with success"
coverage:
go tool cover -html=coverage.out
test: example run_test coverage
bench_query_builder:
go test -bench=. -benchmem -benchtime=7s -run=^_ ./query/...
bench_comparing_sqlite:
go test -bench=Benchmark_SIMDVsSQLite -benchmem -benchtime=5s -run=^_ ./benchmarks/...
bench_query:
go test -bench=Benchmark_Query -benchmem -benchtime=5s -run=^_ ./benchmarks/...
bench_set:
go test -bench=. -benchmem -benchtime=3s -run=^_ ./set/...
bench_concurrent:
go test -bench=Benchmark_Concurrent -benchmem -benchtime=2000x -run=^_ ./benchmarks/...
bench_indexes:
go test -bench=Benchmark_Indexes -benchmem -benchtime=1s -run=^_ ./benchmarks/...
bench_indexes_btree:
go test -bench=Benchmark_BTreeIndexesMaxChildren -benchmem -benchtime=1s -run=^_ ./benchmarks/...
make bench: bench_set bench_query_builder bench_query bench_indexes bench_indexes_btree bench_concurrent bench_comparing_sqlite
lint:
docker run --rm -t -v ./:/app -v ~/.cache/golangci-lint/v1.61.0:/root/.cache -w /app golangci/golangci-lint:v1.61.0 golangci-lint run
lint_fix:
docker run --rm -t -v ./:/app -v ~/.cache/golangci-lint/v1.61.0:/root/.cache -w /app golangci/golangci-lint:v1.61.0 golangci-lint run --fix