feat(ipfs diag profile): help text
Steven Allen committed
Jul 21, 2021 at 15:46 UTC
77f3fed5a1f0aebe4fcf5658abe7e582d5597b96
2 files changed
+38
core/commands/commands_test.go
+1
@@ -117,6 +117,7 @@ func TestCommands(t *testing.T) {
117
"/diag/cmds",
118
"/diag/cmds/clear",
119
"/diag/cmds/set-time",
120
+ "/diag/profile",
121
"/diag/sys",
122
"/dns",
123
"/file",
core/commands/profile.go
+37
@@ -26,6 +26,43 @@ type profileResult struct {
26
const cpuProfileTimeOption = "cpu-profile-time"
27
28
var sysProfileCmd = &cmds.Command{
29
+ Helptext: cmds.HelpText{
30
+ Tagline: "Collect a performance profile for debugging.",
31
+ ShortDescription: `
32
+Collects cpu, heap, and goroutine profiles from a running go-ipfs daemon
33
+into a single zipfile. To aid in debugging, this command also attempts to
34
+include a copy of the running go-ipfs binary.
35
+`,
36
+ LongDescription: `
37
+Collects cpu, heap, and goroutine profiles from a running go-ipfs daemon
38
+into a single zipfile. To aid in debugging, this command also attempts to
39
+include a copy of the running go-ipfs binary.
40
+
41
+Privacy Notice:
42
+
43
+The output file includes:
44
+
45
+- A list of running goroutines.
46
+- A CPU profile.
47
+- A heap profile.
48
+- Your copy of go-ipfs.
49
+- The output of 'ipfs version --all'.
50
+
51
+It does not include:
52
+
53
+- Any of your IPFS data or metadata.
54
+- Your config or private key.
55
+- Your IP address.
56
+- The contents of your computer's memory, filesystem, etc.
57
+
58
+However, it could reveal:
59
+
60
+- Your build path, if you built go-ipfs yourself.
61
+- If and how a command/feature is being used (inferred from running functions).
62
+- Memory offsets of various data structures.
63
+- Any modifications you've made to go-ipfs.
64
+`,
65
+ },
66
NoLocal: true,
67
Options: []cmds.Option{
68
cmds.StringOption(outputOptionName, "o", "The path where the output should be stored."),