Manual command setup was starting to show some strain in
terms of documentation and also adding new features
(regardless of what the protocol supports currently).
This new setup aims to make it easier to add new
documentation and functionality.
In comparison to the previous version, this increased the
binary size by 2.4M.
```
6.4M gops
4.0M gops_master
```
The change in #154 lead to the CPU usage being reported for a 0s
duration:
cpu usage (0s): NaN%
Fix this by only reporting CPU usage per period if the user specified a
positive duration.
The current implementation assumes the given duration in seconds.
Instead, also allow to specify a duration in the format as expected by
`time.ParseDuration` and use that if found. If a plain integer is
specified, it is still parsed as a duration in seconds.
Commit 78435f89 changed the existing output format for the CPU usage
from `cpu usage:` to `cpu usage (all):`.
This might break existing scripts relying on this format. Revert that
part of the change and only report the CPU usage for the given period
with a suffix:
cpu usage: 0.087%
cpu usage (1s): 1.42%
In case a process has been running for a multiple of 24 hours, the
process runtime will be formatted as DD-MM:SS instead of DD-HH:MM:SS.
Fix this and add a test for fmtEtimeDuration.
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.
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.