Skip to content

Commit

Permalink
feat(ipfs diag profile): help text
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Jul 21, 2021
1 parent 722fc4f commit 77f3fed
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/commands/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ func TestCommands(t *testing.T) {
"/diag/cmds",
"/diag/cmds/clear",
"/diag/cmds/set-time",
"/diag/profile",
"/diag/sys",
"/dns",
"/file",
Expand Down
37 changes: 37 additions & 0 deletions core/commands/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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."),
Expand Down

0 comments on commit 77f3fed

Please sign in to comment.