Repository: incubator-mynewt-newt
Updated Branches:
  refs/heads/develop 41e8c790b -> 7b802ae47


newtmgr; taskstats output formatting.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/7b802ae4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/7b802ae4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/7b802ae4

Branch: refs/heads/develop
Commit: 7b802ae47acf46ef264a9d592c57c34aad6ab408
Parents: 41e8c79
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Wed Oct 12 12:54:29 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Wed Oct 12 12:54:29 2016 -0700

----------------------------------------------------------------------
 newtmgr/cli/taskstats.go | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/7b802ae4/newtmgr/cli/taskstats.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/taskstats.go b/newtmgr/cli/taskstats.go
index 3b96dea..17122c7 100644
--- a/newtmgr/cli/taskstats.go
+++ b/newtmgr/cli/taskstats.go
@@ -59,10 +59,12 @@ func taskStatsRunCmd(cmd *cobra.Command, args []string) {
 
        fmt.Printf("Return Code = %d\n", tsrsp.ReturnCode)
        if tsrsp.ReturnCode == 0 {
+               fmt.Printf("  %8s %3s %3s %8s %8s %8s %8s %8s %8s\n",
+                       "task", "pri", "tid", "runtime", "csw", "stksz",
+                       "stkuse", "last_checkin", "next_checkin");
                for k, info := range tsrsp.Tasks {
-                       fmt.Printf("  %s ", k)
-                       fmt.Printf("(prio=%d tid=%d runtime=%d cswcnt=%d 
stksize=%d "+
-                               "stkusage=%d last_checkin=%d next_checkin=%d)",
+                       fmt.Printf("  %8s %3d %3d %8d %8d %8d %8d %8d %8d\n",
+                               k,
                                int(info["prio"].(uint64)),
                                int(info["tid"].(uint64)),
                                int(info["runtime"].(uint64)),
@@ -71,7 +73,6 @@ func taskStatsRunCmd(cmd *cobra.Command, args []string) {
                                int(info["stkuse"].(uint64)),
                                int(info["last_checkin"].(uint64)),
                                int(info["next_checkin"].(uint64)))
-                       fmt.Printf("\n")
                }
        }
 }

Reply via email to