From: Bjørn Erik Pedersen Date: Tue, 23 Apr 2019 15:14:02 +0000 (+0200) Subject: commands: Init mem profile at the end X-Git-Tag: v0.55.4~7 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4c3c5120389cc95edc63b8f18a0eee786aa0c5e2;p=brevno-suite%2Fhugo commands: Init mem profile at the end Much more useful ... --- diff --git a/commands/hugo.go b/commands/hugo.go index 4ca0eff6..0a6b9750 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() }