@@ -62,6 +62,7 @@ install-tools-go:
62
62
$(GO ) install github.com/google/osv-scanner/cmd/osv-scanner@v1
63
63
$(GO ) install github.com/goph/licensei/cmd/licensei@latest
64
64
$(GO ) install github.com/nikolaydubina/go-binsize-treemap@latest
65
+ $(GO ) install github.com/nikolaydubina/go-cover-treemap@latest
65
66
$(GO ) install github.com/orlangure/gocovsh@latest
66
67
$(GO ) install github.com/pelletier/go-toml/v2/cmd/tomljson@latest
67
68
$(GO ) install github.com/securego/gosec/v2/cmd/gosec@latest
@@ -322,13 +323,17 @@ ifeq ($(DEBUG), true)
322
323
else
323
324
TF_ACC=1 gotestsum --format testname -- -run=TestAcc$(NAME) -count=1 -parallel=$(shell nproc) -timeout 30m -coverpkg=./corefuncprovider/... -coverprofile=__coverage.out -v ./corefuncprovider/...
324
325
endif
326
+ go-cover-treemap -coverprofile __coverage.out > acc-coverage.svg
327
+ rsvg-convert --width=2000 --format=png --output="acc-coverage.png" "acc-coverage.svg"
325
328
326
329
.PHONY : unit
327
330
# # unit: [test] Runs unit tests. Set NAME= (without 'Test') to run a specific test by name
328
331
unit :
329
332
@ $(ECHO ) " "
330
333
@ $(ECHO ) " \033[1;33m=====> Running unit tests...\033[0m"
331
334
gotestsum --format testname -- -run=Test$(NAME ) -count=1 -parallel=$(shell nproc) -timeout 30s -coverpkg=./corefunc/... -coverprofile=__coverage.out -v ./corefunc/...
335
+ go-cover-treemap -coverprofile __coverage.out > unit-coverage.svg
336
+ rsvg-convert --width=2000 --format=png --output=" unit-coverage.png" " unit-coverage.svg"
332
337
333
338
.PHONY : examples
334
339
# # examples: [test] Runs tests for examples. Set NAME= (without 'Example') to run a specific test by name
@@ -347,16 +352,22 @@ fuzz:
347
352
.PHONY : quickbench
348
353
# # quickbench: [test]* Runs the benchmarks with minimal data for a quick check
349
354
quickbench :
355
+ @ $(ECHO ) " "
356
+ @ $(ECHO ) " \033[1;33m=====> Running " quick" benchmark...\033[0m"
350
357
$(GO ) test -bench=. -timeout 60m ./corefunc
351
358
352
359
.PHONY : bench
353
360
# # bench: [test]* Runs the benchmarks with enough data for analysis with benchstat.
354
361
bench :
362
+ @ $(ECHO ) " "
363
+ @ $(ECHO ) " \033[1;33m=====> Running " full" benchmark...\033[0m"
355
364
$(GO ) test -bench=. -count=6 -timeout 60m -benchmem -cpuprofile=__cpu.out -memprofile=__mem.out -trace=__trace.out ./corefunc | tee __bench-$(shell date --utc "+% Y% m% dT% H% M% SZ") .out
356
365
357
366
.PHONY : pgo
358
367
# # pgo: [test] Runs the benchmarks with enough data for use with Profile-Guided Optimization.
359
368
pgo :
369
+ @ $(ECHO ) " "
370
+ @ $(ECHO ) " \033[1;33m=====> Running benchmark for PGO data...\033[0m"
360
371
TF_ACC=1 go test -run=^TestAcc -count=6 -cpuprofile=default.pgo -parallel=$(shell nproc) -timeout 60m ./corefuncprovider/...
361
372
362
373
.PHONY : view-cov-cli
@@ -382,7 +393,7 @@ view-mempprof:
382
393
.PHONY : view-trace
383
394
# # view-trace: [test] After running bench, this will launch a browser to view the trace results.
384
395
view-trace :
385
- $(GO ) tool trace _trace .out
396
+ $(GO ) tool trace __trace .out
386
397
387
398
# -------------------------------------------------------------------------------
388
399
# Git Tasks
0 commit comments