diff --git a/core/commands/commands_test.go b/core/commands/commands_test.go index 288f8a1ad..77a448a50 100644 --- a/core/commands/commands_test.go +++ b/core/commands/commands_test.go @@ -117,6 +117,7 @@ func TestCommands(t *testing.T) { "/diag/cmds", "/diag/cmds/clear", "/diag/cmds/set-time", + "/diag/profile", "/diag/sys", "/dns", "/file", diff --git a/core/commands/profile.go b/core/commands/profile.go index 66abf7cef..a2f1407dc 100644 --- a/core/commands/profile.go +++ b/core/commands/profile.go @@ -26,6 +26,43 @@ type profileResult struct { const cpuProfileTimeOption = "cpu-profile-time" var sysProfileCmd = &cmds.Command{ + Helptext: cmds.HelpText{ + Tagline: "Collect a performance profile for debugging.", + ShortDescription: ` +Collects cpu, heap, and goroutine profiles from a running go-ipfs daemon +into a single zipfile. To aid in debugging, this command also attempts to +include a copy of the running go-ipfs binary. +`, + LongDescription: ` +Collects cpu, heap, and goroutine profiles from a running go-ipfs daemon +into a single zipfile. To aid in debugging, this command also attempts to +include a copy of the running go-ipfs binary. + +Privacy Notice: + +The output file includes: + +- A list of running goroutines. +- A CPU profile. +- A heap profile. +- Your copy of go-ipfs. +- The output of 'ipfs version --all'. + +It does not include: + +- Any of your IPFS data or metadata. +- Your config or private key. +- Your IP address. +- The contents of your computer's memory, filesystem, etc. + +However, it could reveal: + +- Your build path, if you built go-ipfs yourself. +- If and how a command/feature is being used (inferred from running functions). +- Memory offsets of various data structures. +- Any modifications you've made to go-ipfs. +`, + }, NoLocal: true, Options: []cmds.Option{ cmds.StringOption(outputOptionName, "o", "The path where the output should be stored."),