turn on block profiling

This should help us figure out where exactly a database is hung when
it happens.
pull/3652/head
Daniel Morsing 2015-08-13 15:28:53 -07:00
parent c81a0afb8f
commit 765eee74b1
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import (
"runtime"
"strconv"
"strings"
"time"
"github.com/BurntSushi/toml"
)
@ -73,6 +74,9 @@ func (cmd *Command) Run(args ...string) error {
// Set parallelism.
runtime.GOMAXPROCS(runtime.NumCPU())
// Turn on block profiling to debug stuck databases
runtime.SetBlockProfileRate(int(10 * time.Second))
// Parse config
config, err := cmd.ParseConfig(options.ConfigPath)
if err != nil {