Evan Chen 32b758725e | ||
---|---|---|
color | ||
.gitignore | ||
README.md | ||
color.go | ||
go.mod | ||
go.sum | ||
log.go | ||
log_test.go | ||
std.go | ||
util.go |
README.md
Logging with color and format string
Test
Mem: go test -o tests/test.exe -memprofile tests/mem && go tool pprof -http : tests/mem
Cpu: go test -o tests/test.exe -cpuprofile tests/cpu && go tool pprof -http : tests/cpu
Bench
go test -bench . -run none --benchmem
v0.0.1
BenchmarkDefault-8 8512 158272 ns/op
BenchmarkSub1-8 6140 166344 ns/op
BenchmarkDefault-8 6190 189078 ns/op 19522 B/op 387 allocs/op
BenchmarkSub1-8 6222 200761 ns/op 20511 B/op 435 allocs/op
go test -bench . -run none --benchmem
test(v0.0.2)
BenchmarkDefault-8 12410 109143 ns/op
BenchmarkSub1-8 10000 113340 ns/op
BenchmarkDefault-8 12186 112974 ns/op 21944 B/op 303 allocs/op
BenchmarkSub1-8 10000 114026 ns/op 22702 B/op 363 allocs/op