Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-11-21 15:07:52 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-11-21 20:11:07 +0300
commit2dcc1318d1d9ed849d040115aa5ba6191a1c102a (patch)
tree913e5537df47c555a1d00e44d97609341edb36c3 /modules/collect.go
parent14a985f8abc527d4e8487fcd5fa742e1ab2a00ed (diff)
Add some more output if loading modules takes time
Also include the time to collect modules etc. in the "Total in ..." time reported for the `hugo` command. Fixes #6519
Diffstat (limited to 'modules/collect.go')
-rw-r--r--modules/collect.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/collect.go b/modules/collect.go
index f5972a5b0..5f377c6dd 100644
--- a/modules/collect.go
+++ b/modules/collect.go
@@ -19,6 +19,7 @@ import (
"os"
"path/filepath"
"strings"
+ "time"
"github.com/gohugoio/hugo/common/loggers"
@@ -468,7 +469,7 @@ func (c *collector) applyThemeConfig(tc *moduleAdapter) error {
}
func (c *collector) collect() {
-
+ defer c.logger.PrintTimerIfDelayed(time.Now(), "hugo: collected modules")
if err := c.initModules(); err != nil {
c.err = err
return