hugolib: Move metrics output to the end of the site build

This commit is contained in:
Cameron Moore
2017-09-27 14:17:43 -05:00
committed by Bjørn Erik Pedersen
parent a354d130dc
commit b277cb33e4
2 changed files with 11 additions and 13 deletions

View File

@@ -14,7 +14,6 @@
package hugolib
import (
"bytes"
"errors"
"fmt"
"html/template"
@@ -1731,18 +1730,7 @@ func (s *Site) appendThemeTemplates(in []string) []string {
// Stats prints Hugo builds stats to the console.
// This is what you see after a successful hugo build.
func (s *Site) Stats() {
s.Log.FEEDBACK.Println()
if s.Cfg.GetBool("templateMetrics") {
var b bytes.Buffer
s.Metrics.WriteMetrics(&b)
s.Log.FEEDBACK.Printf("Template Metrics:\n\n")
s.Log.FEEDBACK.Print(b.String())
s.Log.FEEDBACK.Println()
}
s.Log.FEEDBACK.Printf("Built site for language %s:\n", s.Language.Lang)
s.Log.FEEDBACK.Printf("\nBuilt site for language %s:\n", s.Language.Lang)
s.Log.FEEDBACK.Println(s.draftStats())
s.Log.FEEDBACK.Println(s.futureStats())
s.Log.FEEDBACK.Println(s.expiredStats())