avoid double unmarshalling

This commit is contained in:
Yann Hamon 2020-12-15 18:35:33 +01:00
parent 4afe9b1977
commit 29a8f4c09e
7 changed files with 72 additions and 17 deletions

View file

@ -5,6 +5,7 @@ import (
"fmt"
"log"
"os"
"runtime"
"runtime/pprof"
"sync"
@ -62,6 +63,8 @@ func realMain() int {
if err := pprof.StartCPUProfile(f); err != nil {
log.Fatal("could not start CPU profile: ", err)
}
runtime.SetBlockProfileRate(1)
defer pprof.StopCPUProfile()
}