cstrftime icon indicating copy to clipboard operation
cstrftime copied to clipboard

Trying to add benchmarks but something is broken

Open apiarian opened this issue 6 years ago • 1 comments

Time doesn't get formatted correctly, decimal seconds disappear, and something about the benchmarks results in null characters for the day of the month in the benchmarks.

The one benchmark that does work so far shows a pretty hefty performance hit:

go test -bench . -benchmem -run XXX
goos: darwin
goarch: amd64
pkg: github.com/apiarian/cstrftime
BenchmarkFormat/year_-_native(true)-4           20000000                95.5 ns/op             4 B/op          1 allocs/op
BenchmarkFormat/year_-_native(false)-4            500000              2486 ns/op              16 B/op          3 allocs/op

apiarian avatar May 06 '18 17:05 apiarian

Also tests will fail in locales that are not UTC (Travis seems to be, but my Mac isn't). Something about the time being reported incorrectly.

apiarian avatar May 06 '18 17:05 apiarian