mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
Use StopTimer in site benchmarks
This commit is contained in:
@@ -133,8 +133,9 @@ func BenchmarkSiteBuilding(b *testing.B) {
|
|||||||
|
|
||||||
func doBenchMarkSiteBuilding(conf siteBuildingBenchmarkConfig, b *testing.B) {
|
func doBenchMarkSiteBuilding(conf siteBuildingBenchmarkConfig, b *testing.B) {
|
||||||
b.Run(conf.String(), func(b *testing.B) {
|
b.Run(conf.String(), func(b *testing.B) {
|
||||||
|
b.StopTimer()
|
||||||
sites := createHugoBenchmarkSites(b, b.N, conf)
|
sites := createHugoBenchmarkSites(b, b.N, conf)
|
||||||
b.ResetTimer()
|
b.StartTimer()
|
||||||
for i := 0; i < b.N; i++ {
|
for i := 0; i < b.N; i++ {
|
||||||
h := sites[0]
|
h := sites[0]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user