aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-04-07 09:13:24 -0700
committerChris Lu <chris.lu@gmail.com>2019-04-07 09:13:24 -0700
commitc731d9be6d28a661037bbd03c0762d0819f6fb7a (patch)
tree40501d8ddcc034480717cc26771964fe544be1ab
parent174bf1e8b2ecfc23e375dcbbf3fca28d73ed172f (diff)
downloadseaweedfs-c731d9be6d28a661037bbd03c0762d0819f6fb7a.tar.xz
seaweedfs-c731d9be6d28a661037bbd03c0762d0819f6fb7a.zip
weed filer.copy: add option to profile the execution
-rw-r--r--weed/command/filer_copy.go4
1 files changed, 4 insertions, 0 deletions
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()