mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Adding total time to generated stats.
This commit is contained in:
parent
51e3098548
commit
d4caa8ee95
1 changed files with 3 additions and 2 deletions
5
main.go
5
main.go
|
@ -23,6 +23,7 @@ import (
|
|||
"path/filepath"
|
||||
"runtime/pprof"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -118,11 +119,11 @@ func serve(port string, config *hugolib.Config) {
|
|||
}
|
||||
|
||||
func buildSite(config *hugolib.Config) *hugolib.Site {
|
||||
startTime := time.Now()
|
||||
site := hugolib.NewSite(config)
|
||||
site.Build()
|
||||
|
||||
site.Stats()
|
||||
|
||||
fmt.Printf("in %v ms\n", int(1000 * time.Since(startTime).Seconds()))
|
||||
return site
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue