diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-04-07 09:13:24 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-04-07 09:13:24 -0700 |
| commit | c731d9be6d28a661037bbd03c0762d0819f6fb7a (patch) | |
| tree | 40501d8ddcc034480717cc26771964fe544be1ab /weed/command/filer_copy.go | |
| parent | 174bf1e8b2ecfc23e375dcbbf3fca28d73ed172f (diff) | |
| download | seaweedfs-c731d9be6d28a661037bbd03c0762d0819f6fb7a.tar.xz seaweedfs-c731d9be6d28a661037bbd03c0762d0819f6fb7a.zip | |
weed filer.copy: add option to profile the execution
Diffstat (limited to 'weed/command/filer_copy.go')
| -rw-r--r-- | weed/command/filer_copy.go | 4 |
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() |
