Adding total time to generated stats.

This commit is contained in:
spf13 2013-07-10 09:21:41 -04:00
parent 51e3098548
commit d4caa8ee95

View file

@ -23,6 +23,7 @@ import (
"path/filepath" "path/filepath"
"runtime/pprof" "runtime/pprof"
"sync" "sync"
"time"
) )
const ( const (
@ -118,11 +119,11 @@ func serve(port string, config *hugolib.Config) {
} }
func buildSite(config *hugolib.Config) *hugolib.Site { func buildSite(config *hugolib.Config) *hugolib.Site {
startTime := time.Now()
site := hugolib.NewSite(config) site := hugolib.NewSite(config)
site.Build() site.Build()
site.Stats() site.Stats()
fmt.Printf("in %v ms\n", int(1000 * time.Since(startTime).Seconds()))
return site return site
} }