hugo/benchSite.sh
Bjørn Erik Pedersen 08a10e5d14 hubolib: Make the site benchmark output more compact
So you can do and get:

```
▶ ./benchSite.sh "YAML,num_pages=10"
Running with BenchmarkSiteBuilding/YAML,num_pages=10
BenchmarkSiteBuilding/YAML,num_pages=10-4                 1000       1611261 ns/op      730749 B/op        6458 allocs/op
PASS
ok      github.com/spf13/hugo/hugolib    8.168s
```
2017-06-01 12:00:47 +02:00

9 lines
No EOL
377 B
Bash
Executable file

#!/bin/bash
# Send in a regexp mathing the benchmarks you want to run, i.e. './benchSite.sh "YAML"'.
# Note the quotes, which will be needed for more complex expressions.
# The above will run all variations, but only for front matter YAML.
echo "Running with BenchmarkSiteBuilding/${1}"
go test -run="NONE" -bench="BenchmarkSiteBuilding/${1}$" -test.benchmem=true ./hugolib