From c731d9be6d28a661037bbd03c0762d0819f6fb7a Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 7 Apr 2019 09:13:24 -0700 Subject: [PATCH] weed filer.copy: add option to profile the execution --- weed/command/filer_copy.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go index c5baff5e4..18b641ae5 100644 --- a/weed/command/filer_copy.go +++ b/weed/command/filer_copy.go @@ -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()