When getting profile dumps for further processing, it's hard to distinguish
CPU and heap profiles from the file names alone. Make this easier by
adding a prefix (cpu or heap) to the file name depending on the type of
profile.
As part of agent.Close, Close is called on the listener. This has
Accept return a "use of closed network connection" error, which is
expected. This error is logged but it would be nice if it wasn't.
Unfortunately, there's not a great way to check for this
error (https://golang.org/issues/4373) so use a best-effort
strings.Contains check.
The path to the profile dump is already logged after writing the file
(cmd.go line 121). Remove the duplicate log line.
Co-authored-by: Emmanuel T Odeke <odeke@ualberta.ca>
The warnings that agent prints to os.Stderr did not previously include
newlines causing program output to get jumbled up when an error occurs.
We see this most often when calling `Close()`, which causes the listener
to print `gops: accept tcp 127.0.0.1:9999: use of closed network
connection` which breaks whatever is logged next.
A PR of xlab/treeprint (https://github.com/xlab/treeprint/pull/6)
which was merged might break gops in the future.
The PR removed treeprint.EdgeTypeStart. To set the root node,
we can now use SetValue(value Value) instead.
In this commit,
dep ensure -update github.com/xlab/treeprint
was executed to update the library and then fix is applied.
gopsutil library is licensed under BSD, but the previous version
contained some GPL-licensed code which is a violation of GPL
license. The updated version doesn't contain GPL-licensed code
anymore.
https://github.com/shirou/gopsutil/issues/518
Implemented a command, where users can list all running Go
processes in a tree-like format (like pstree).
Example:
$ gops tree
...
├── 13744
│ └── 71746 (gops) {go1.10}
├── 1
│ └── 13962 (gocode) {go1.9}
└── 557
└── 635 (com.docker.supervisor) {go1.9.2}
└── 638 (com.docker.driver.amd64-linux) {go1.9.2}
* Introducing support to debug.SetGCPercent.
Fixes#8
On my I needed to augment a little bit the communication
protocol to add support to optional parameters.
* update README snippets to reflect the new output
Updated the sample output in the README to match the
properly tabulated output when actually running the program.
internal object packages are no longer required
given gops depends on rsc.io/goversion/version now.
Also running dep prune to remove the packages
gops doesn't depend from the vendor directory.
Follow up of
112843115d (commitcomment-23936637)
Solves the problem of us having to manually watch
upstream and pull in bug fixes and updates, if our
internal copy goes stale.
Fixes#22.