Skip to content

Commit

Permalink
Improve the help text (#94)
Browse files Browse the repository at this point in the history
Avoid using tabs, remove help from "subcommands" list,
don't differentiate the profiling commands from others.
  • Loading branch information
rakyll authored Aug 2, 2019
1 parent 6cdc0c0 commit 59c8be2
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,24 @@ import (

const helpText = `gops is a tool to list and diagnose Go processes.
gops <cmd> <pid|addr> ...
gops <pid> # displays process info
Usage:
gops <cmd> <pid|addr> ...
gops <pid> # displays process info
gops help # displays this help message
Commands:
stack Prints the stack trace.
gc Runs the garbage collector and blocks until successful.
setgc Sets the garbage collection target percentage.
memstats Prints the allocation and garbage collection stats.
version Prints the Go version used to build the program.
stats Prints the vital runtime stats.
help Prints this help text.
Profiling commands:
trace Runs the runtime tracer for 5 secs and launches "go tool trace".
pprof-heap Reads the heap profile and launches "go tool pprof".
pprof-cpu Reads the CPU profile and launches "go tool pprof".
stack Prints the stack trace.
gc Runs the garbage collector and blocks until successful.
setgc Sets the garbage collection target percentage.
memstats Prints the allocation and garbage collection stats.
version Prints the Go version used to build the program.
stats Prints runtime stats.
trace Runs the runtime tracer for 5 secs and launches "go tool trace".
pprof-heap Reads the heap profile and launches "go tool pprof".
pprof-cpu Reads the CPU profile and launches "go tool pprof".
All commands require the agent running on the Go process.
Symbol "*" indicates the process runs the agent.`
"*" indicates the process is running the agent.`

// TODO(jbd): add link that explains the use of agent.

Expand Down

0 comments on commit 59c8be2

Please sign in to comment.