Adding total time to generated stats.
authorspf13 <steve.francia@gmail.com>
Wed, 10 Jul 2013 13:21:41 +0000 (09:21 -0400)
committerspf13 <steve.francia@gmail.com>
Wed, 10 Jul 2013 13:21:41 +0000 (09:21 -0400)
main.go

diff --git a/main.go b/main.go
index 9bb5ccd808921aed6a385ab106acf002fa1fb7f8..8d37afee4abb9096fe33be782dabe5f96434bfbc 100644 (file)
--- a/main.go
+++ b/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
 }