-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (35 loc) · 972 Bytes
/
Copy pathMakefile
File metadata and controls
44 lines (35 loc) · 972 Bytes
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
.PHONY: con
con: ./cmd/console/main.go
@go run ./cmd/console $(ARGS)
.PHONY: con-debug
con-debug:
@$(MAKE) con ARGS='-log-level=debug'
.PHONY: swagger
swagger:
@cd ./cmd/server && swag init -g main.go -o ../../docs --parseDependency --parseInternal
.PHONY: server
server: swagger ./cmd/server/main.go
@go run ./cmd/server $(ARGS)
.PHONY: server-debug
server-debug:
@$(MAKE) server ARGS='-log-level=debug'
.PHONY: frontend
frontend:
@cd frontend && bun dev
.PHONY: frontend-build
frontend-build:
@cd frontend && bun run build
.PHONY: bench
bench:
@echo "Enter a name for the benchmark result file (without extension):"; \
read filename; \
mkdir -p ./benchmark; \
TIMESTAMP=$$(date +"%Y-%m-%d_%H-%M-%S"); \
go test -bench=. -count=6 ./... | tee ./benchmark/$${filename}_$${TIMESTAMP}.txt
.PHONY: bench-clean
bench-clean:
@rm -rf ./benchmark
# go install golang.org/x/perf/cmd/benchstat@latest
.PHONY: bench-stat
bench-stat:
@benchstat benchmark/*.txt