summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-04-23 17:14:02 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-04-23 17:14:02 +0200
commit4c3c5120389cc95edc63b8f18a0eee786aa0c5e2 (patch)
treef8329e747b513276579c598cb369022c851b281e /commands
parent0775c98e6c5b700e46adaaf190fc3f693a6ab002 (diff)
commands: Init mem profile at the end
Much more useful ...
Diffstat (limited to 'commands')
-rw-r--r--commands/hugo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/hugo.go b/commands/hugo.go
index 4ca0eff69..0a6b9750c 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -431,8 +431,6 @@ func (c *commandeer) initProfiling() (func(), error) {
return nil, err
}
- defer c.initMemProfile()
-
stopMutexProf, err := c.initMutexProfile()
if err != nil {
return nil, err
@@ -444,6 +442,8 @@ func (c *commandeer) initProfiling() (func(), error) {
}
return func() {
+ c.initMemProfile()
+
if stopCPUProf != nil {
stopCPUProf()
}