weed filer.copy: add option to profile the execution

This commit is contained in:
Chris Lu 2019-04-07 09:13:24 -07:00
parent 174bf1e8b2
commit c731d9be6d

View file

@ -114,6 +114,10 @@ func runCopy(cmd *Command, args []string) bool {
go copy.masterClient.KeepConnectedToMaster()
copy.masterClient.WaitUntilConnected()
if *cmdCopy.IsDebug {
util.SetupProfiling("filer.copy.cpu.pprof", "filer.copy.mem.pprof")
}
fileCopyTaskChan := make(chan FileCopyTask, *copy.concurrency)
ctx := context.Background()