[riot-notifications] [RIOT-OS/RIOT] sys/ps: enable runtime_usec output for the ps command (#16470)

jan-mo notifications at github.com
Wed May 12 15:53:39 CEST 2021

The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.

### Contribution description
I found no way to display the actual time in a thread. The only way is to display the percentage of every thread. So if you only have the percentage you can not distinguish between very inactive threads, because the percentage gets to zero.
I created a new entry for the `schedstatistics` module. The `ps` command is extended by the `runtime_usec` entry.
The time spend in each thread are calculated from the `xtimer` ticks and are displayed in micro seconds.

Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes

### Testing procedure
For testing you can use `examples/gnrc_networking` with `USEMODULE=schedstatistics make -j` to enable the `schedstatistics` module and see the new entry (`runtime_usec`) after the `ps` command.
I used the `samd20-xpro` for testing, but it should not matter which board is used.

Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output

Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * sys/ps/ps.c: enabled runtime in usec for schedstatistics

-- File Changes --

    M sys/ps/ps.c (8)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210512/aa4ce9a6/attachment.htm>

More information about the notifications mailing list