mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2025-01-09 14:20:48 +00:00
add bench to makefile
This commit is contained in:
parent
1ea679ebe3
commit
475ccfe0ba
@ -2,5 +2,14 @@ goos: linux
|
||||
goarch: amd64
|
||||
pkg: github.com/onyx-and-iris/aoc2024/day-01
|
||||
cpu: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
|
||||
BenchmarkMain-12 1000000000 0.001628 ns/op
|
||||
ok github.com/onyx-and-iris/aoc2024/day-01 0.015s
|
||||
BenchmarkMain-12 1000000000 0.001576 ns/op
|
||||
BenchmarkMain-12 1000000000 0.001731 ns/op
|
||||
BenchmarkMain-12 1000000000 0.001616 ns/op
|
||||
BenchmarkMain-12 1000000000 0.001597 ns/op
|
||||
BenchmarkMain-12 1000000000 0.001559 ns/op
|
||||
BenchmarkMain-12 1000000000 0.001657 ns/op
|
||||
BenchmarkMain-12 1000000000 0.001542 ns/op
|
||||
BenchmarkMain-12 1000000000 0.001561 ns/op
|
||||
BenchmarkMain-12 1000000000 0.001574 ns/op
|
||||
BenchmarkMain-12 1000000000 0.001582 ns/op
|
||||
ok github.com/onyx-and-iris/aoc2024/day-01 0.126s
|
||||
|
@ -8,7 +8,7 @@ EXE := $(BIN_DIR)/$(program)
|
||||
|
||||
.DEFAULT_GOAL := build
|
||||
|
||||
.PHONY: fmt vet build clean
|
||||
.PHONY: fmt vet build bench clean
|
||||
fmt:
|
||||
$(GO) fmt ./...
|
||||
|
||||
@ -18,6 +18,9 @@ vet: fmt
|
||||
build: vet | $(BIN_DIR)
|
||||
$(GO) build -o $(EXE) .
|
||||
|
||||
bench:
|
||||
$(GO) test . -test.count=10 -bench=. > benchmark
|
||||
|
||||
$(BIN_DIR):
|
||||
@mkdir -p $@
|
||||
|
||||
|
@ -21,7 +21,7 @@ EXE := \$(BIN_DIR)/\$(program)
|
||||
|
||||
.DEFAULT_GOAL := build
|
||||
|
||||
.PHONY: fmt vet build clean
|
||||
.PHONY: fmt vet build bench clean
|
||||
fmt:
|
||||
\$(GO) fmt ./...
|
||||
|
||||
@ -31,6 +31,9 @@ vet: fmt
|
||||
build: vet | \$(BIN_DIR)
|
||||
\$(GO) build -o \$(EXE) ./\$(SRC_DIR)
|
||||
|
||||
bench:
|
||||
\$(GO) test . -test.count=10 -bench=. > benchmark
|
||||
|
||||
\$(BIN_DIR):
|
||||
@mkdir -p \$@
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user