mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 19:02:07 -05:00
Fix hugo benchmark
Appending to the site 13 times doesn't sound realistic.
This commit is contained in:
parent
d08e4c87a7
commit
12876ec991
1 changed files with 2 additions and 0 deletions
|
@ -53,6 +53,7 @@ func benchmark(cmd *cobra.Command, args []string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
for i := 0; i < benchmarkTimes; i++ {
|
for i := 0; i < benchmarkTimes; i++ {
|
||||||
|
mainSite = nil
|
||||||
_ = buildSite()
|
_ = buildSite()
|
||||||
}
|
}
|
||||||
pprof.WriteHeapProfile(f)
|
pprof.WriteHeapProfile(f)
|
||||||
|
@ -71,6 +72,7 @@ func benchmark(cmd *cobra.Command, args []string) error {
|
||||||
pprof.StartCPUProfile(f)
|
pprof.StartCPUProfile(f)
|
||||||
defer pprof.StopCPUProfile()
|
defer pprof.StopCPUProfile()
|
||||||
for i := 0; i < benchmarkTimes; i++ {
|
for i := 0; i < benchmarkTimes; i++ {
|
||||||
|
mainSite = nil
|
||||||
_ = buildSite()
|
_ = buildSite()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue