Cameron Moore
ed1f9ed9de
Add sanity check tests to benchmark dataset ( #497 )
...
Marshal results into JSON and ensure all runners match
2021-04-09 11:27:22 -04:00
Cameron Moore
5f877c52fd
Add additional dataset to benchmarks ( #490 )
...
Adding several files to stress test the unmarshaller. Most were
converted from JSON so they may not be very realistic use cases.
```
goos: linux
goarch: amd64
pkg: github.com/pelletier/go-toml/v2/benchmark
cpu: Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz
BenchmarkUnmarshalDataset/config/v2-2 16 66339063 ns/op 15.81 MB/s 16850159 B/op 645454 allocs/op
BenchmarkUnmarshalDataset/config/v1-2 7 147289186 ns/op 7.12 MB/s 60669811 B/op 870486 allocs/op
BenchmarkUnmarshalDataset/config/bs-2 12 88966009 ns/op 11.79 MB/s 29949268 B/op 705573 allocs/op
BenchmarkUnmarshalDataset/canada/v2-2 8 145433377 ns/op 15.14 MB/s 74282227 B/op 895641 allocs/op
BenchmarkUnmarshalDataset/canada/v1-2 3 434913677 ns/op 5.06 MB/s 138664290 B/op 1897300 allocs/op
BenchmarkUnmarshalDataset/citm_catalog/v2-2 19 55256979 ns/op 10.10 MB/s 37122952 B/op 369492 allocs/op
BenchmarkUnmarshalDataset/citm_catalog/v1-2 10 110343191 ns/op 5.06 MB/s 54743595 B/op 727704 allocs/op
BenchmarkUnmarshalDataset/citm_catalog/bs-2 21 51634081 ns/op 10.81 MB/s 17196872 B/op 325830 allocs/op
BenchmarkUnmarshalDataset/twitter/v2-2 50 26660937 ns/op 16.57 MB/s 15580238 B/op 156394 allocs/op
BenchmarkUnmarshalDataset/twitter/v1-2 30 43128488 ns/op 10.25 MB/s 21203420 B/op 266110 allocs/op
BenchmarkUnmarshalDataset/twitter/bs-2 48 27337976 ns/op 16.16 MB/s 8795405 B/op 145370 allocs/op
BenchmarkUnmarshalDataset/code/v2-2 4 276279202 ns/op 9.71 MB/s 59293948 B/op 2907227 allocs/op
BenchmarkUnmarshalDataset/code/v1-2 3 421910642 ns/op 6.36 MB/s 161733770 B/op 2478194 allocs/op
BenchmarkUnmarshalDataset/code/bs-2 4 323158157 ns/op 8.31 MB/s 133056988 B/op 1439475 allocs/op
BenchmarkUnmarshalDataset/example/v2-2 2444 479553 ns/op 16.89 MB/s 237606 B/op 3609 allocs/op
BenchmarkUnmarshalDataset/example/v1-2 1321 911995 ns/op 8.88 MB/s 377502 B/op 6133 allocs/op
BenchmarkUnmarshalDataset/example/bs-2 1898 555649 ns/op 14.58 MB/s 178485 B/op 3362 allocs/op
BenchmarkUnmarshalSimple/v2-2 896760 1200 ns/op
BenchmarkUnmarshalSimple/v1-2 207364 6070 ns/op
BenchmarkUnmarshalSimple/bs-2 420952 2925 ns/op
BenchmarkReferenceFile/v2-2 29473 39433 ns/op 132.93 MB/s 11812 B/op 253 allocs/op
BenchmarkReferenceFile/v1-2 2823 361383 ns/op 14.51 MB/s 136470 B/op 2745 allocs/op
BenchmarkReferenceFile/bs-2 3097 391116 ns/op 13.40 MB/s 80795 B/op 1729 allocs/op
PASS
ok github.com/pelletier/go-toml/v2/benchmark 34.255s
```
2021-04-01 10:13:13 -04:00
Cameron Moore
e5255a5be2
Set bytes in ReferenceFile benchmark to show throughput results ( #489 )
2021-03-30 12:34:25 -04:00
Thomas Pelletier
e5a091a092
Don't depend on my computer path
2021-03-27 23:43:24 -04:00
Thomas Pelletier
8a8d1233bb
First benchmark!
...
~/s/g/p/g/benchmark$ go test -bench=.
goos: linux
goarch: amd64
pkg: github.com/pelletier/go-toml/v2/benchmark
cpu: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
BenchmarkUnmarshalSimple/v2-8 1607115 742.0 ns/op
BenchmarkUnmarshalSimple/v1-8 307977 3915 ns/op
BenchmarkUnmarshalSimple/bs-8 516754 2330 ns/op
BenchmarkReferenceFile/v2-8 9604 129158 ns/op 111422 B/op 1381 allocs/op
BenchmarkReferenceFile/v1-8 4521 263808 ns/op 130566 B/op 2649 allocs/op
BenchmarkReferenceFile/bs-8 4070 296271 ns/op 80784 B/op 1729 allocs/op
PASS
ok github.com/pelletier/go-toml/v2/benchmark 8.139s
2021-03-24 22:15:12 -04:00
Thomas Pelletier
b4bb91fc13
test
2021-01-30 09:07:55 -05:00
Thomas Pelletier
5c66c78bc5
Remove date regexp ( #447 )
...
* Remove date regexp
Hand-roll the date matching logic to avoid trying to match a regexp on
every integer.
```
benchmark old ns/op new ns/op delta
BenchmarkUnmarshalToml-8 293449 272134 -7.26%
benchmark old allocs new allocs delta
BenchmarkUnmarshalToml-8 2746 2650 -3.50%
benchmark old bytes new bytes delta
BenchmarkUnmarshalToml-8 133604 127548 -4.53%
```
* Remove fuzzit
The company has been acquired by GitLab and shutting down.
2020-10-11 15:31:33 -04:00
Allen
88263a05cc
move benchmark to a seperate diectory ( #420 )
...
Fixes #418
2020-06-15 17:55:19 -04:00