Added nf tag and core to stats#110
Conversation
CI MessageYour results will arrive shortly |
| "drop\n------------------------------------------------------------------------------------------------------------------\n"; | ||
| NF_MSG[1] = | ||
| "\nNF IID / SID rx_pps / tx_pps rx / tx out / tonf / drop\n" | ||
| "\nNF TAG IID / SID / CORE rx_pps / tx_pps rx_drop / tx_drop out / tonf / drop\n" |
There was a problem hiding this comment.
Define these lines in a header file
|
Also please include screenshots |
CI MessageRun successful see results: Linter Failedexamples/arp_response/arp_response.c:284: Lines should be <= 120 characters long [whitespace/line_length] [5] |
|
Looks nice, I'll try to review after SD |
|
As we discussed in the meeting:
|
|
|
||
| if (verbosity_level == ONVM_RAW_STATS_DUMP) { | ||
| fprintf(stats_out, "%s,%u,%u,%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%" PRIu64 | ||
| fprintf(stats_out, "%s,%s,%u,%u,%u,%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%" PRIu64 |
There was a problem hiding this comment.
I suggest we define this String the same way we define ONVM_STATS_MSG and others, it takes up like 4 lines here and isn't very readable.
|
Also we'll probably want to wait for the shared cpu changes so we can have 1 nice stats update instead of adding another pr later. |
|
Waiting on merging this because shared cpu has additional stats |
|
@nks5295 brought up a good idea, we can add the number of children into the |
|
@onvm testy test |
CI MessageYour results will arrive shortly |
onvm
left a comment
There was a problem hiding this comment.
@onvm testy test
CI Message
Run successful see results:
✔️ PR submitted to develop branch
✔️ Speed tester performance check passed
❌ Linter Failed (please fix style errors)
[Results from nimbnode30]
- Median TX pps for Speed Tester: 35238454
- Performance rating - 100.68% (compared to 35000000 average)
Linter Output
onvm/onvm_mgr/onvm_stats.c:465: Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
onvm/onvm_mgr/onvm_stats.c:465: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:466: Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
onvm/onvm_mgr/onvm_stats.c:466: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:469: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:472: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:474: Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
onvm/onvm_mgr/onvm_stats.c:474: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:475: Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
onvm/onvm_mgr/onvm_stats.c:475: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:478: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:480: Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
onvm/onvm_mgr/onvm_stats.c:480: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:523: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:526: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:535: Lines should be <= 120 characters long [whitespace/line_length] [5]
Total errors found: 16
onvm/onvm_mgr/onvm_stats.h:63: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:66: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:67: Lines should be <= 120 characters long [whitespace/line_length] [5]
Total errors found: 3
| #define ONVM_STR_STATS_WEB "web" | ||
|
|
||
| extern const char *NF_MSG[3]; | ||
| #define ONVM_STATS_MSG "\nNF TAG IID / SID / CORE rx_pps / tx_pps rx_drop / tx_drop"\ |
There was a problem hiding this comment.
Lets try
#define ONVM_STATS_MSG \
"\nNF TAG IID / SID / CORE rx_pps / tx_pps rx_drop / tx_drop out / tonf / drop\n"\
...
This way its cleaner to read. Also I feel like its fine if it goes over the char limit for these definitions
There was a problem hiding this comment.
Ok sounds good, and line limits are going to be the only lint errors in this pr which is fine I guess
koolzz
left a comment
There was a problem hiding this comment.
Instead of working on the bottom in verbose mode can we have
children / parent / State
.
.
.
5 / 3 / W
Not sure how to fit the names but you get the idea (could we shorten those somehow, if not just add space heh)
Regarding other code comments try moving all the incredibly long "%-14s %2u / %-2u / %2u" Strings into the .h file. That might make the code a bit cleaner
| "\n---------------------------------------------------------------------------------------------------" | ||
| "\n"; | ||
| } | ||
| "\nNF TAG IID / SID / CORE rx_pps / tx_pps rx_drop / tx_drop" |
| act_next, act_buffer, act_returned, num_wakeups, wakeup_rate, active); | ||
| } else if (verbosity_level == 2) { | ||
| fprintf(stats_out, "NF %2u / %-2u - %9" PRIu64 " / %-9" PRIu64 " %11" PRIu64 " / %-11" PRIu64 | ||
| fprintf(stats_out, "%-14s %2u / %-2u / %2u %9" PRIu64 " / %-9" PRIu64 " %11" PRIu64 " / %-11" PRIu64 |
There was a problem hiding this comment.
Try defining ""%-14s %2u / %-2u / %2u %9" PRIu64 " / %-9" PRIu64 " %11" PRIu64 " / %-11" PRIu64......."
in the .h file. Might make this a bit cleaner.
There was a problem hiding this comment.
If you think that moving that into the .h file is harder to maintain you can keep it. You call
|
@onvm tell me how it is |
CI MessageYour results will arrive shortly |
|
Should we shorten the lines so its a bit better alligned? I nknow its less intuitive but this was the panel looks nice |
onvm
left a comment
There was a problem hiding this comment.
@onvm tell me how it is
CI Message
Run successful see results:
✔️ PR submitted to develop branch
✔️ Speed tester performance check passed
❌ Linter Failed (please fix style errors)
[Results from nimbnode30]
- Median TX pps for Speed Tester: 38619871
- Performance rating - 110.34% (compared to 35000000 average)
Linter Output
onvm/onvm_mgr/onvm_stats.c:405: If an else has a brace on one side, it should have it on both [readability/braces] [5]
onvm/onvm_mgr/onvm_stats.c:496: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:497: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:501: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:502: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:506: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.c:510: Lines should be <= 120 characters long [whitespace/line_length] [5]
Total errors found: 7
onvm/onvm_mgr/onvm_stats.h:64: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:68: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:69: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:76: Lines should be <= 120 characters long [whitespace/line_length] [5]
Total errors found: 4
|
I think we can do the above comment^ + basically only display the 3rd line in verbose mode (it'll only have shared cpu stats) when shared CPU is enabled. |
|
@onvm how do you like me now? |
CI MessageYour results will arrive shortly |
onvm
left a comment
There was a problem hiding this comment.
@onvm how do you like me now?
CI Message
Run successful see results:
✔️ PR submitted to develop branch
✔️ Speed tester performance check passed
❌ Linter Failed (please fix style errors)
[Results from nimbnode30]
- Median TX pps for Speed Tester: 38593746
- Performance rating - 110.27% (compared to 35000000 average)
Linter Output
onvm/onvm_mgr/onvm_stats.h:64: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:70: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:77: Lines should be <= 120 characters long [whitespace/line_length] [5]
Total errors found: 3
|
@onvm are the updates working? |
CI MessageYour results will arrive shortly |
onvm
left a comment
There was a problem hiding this comment.
@onvm are the updates working?
CI Message
Run successful see results:
✔️ PR submitted to develop branch
✔️ Speed tester performance check passed
❌ Linter Failed (please fix style errors)
[Results from nimbnode30]
- Median TX pps for Speed Tester: 38611526
- Performance rating - 110.32% (compared to 35000000 average)
Linter Output
onvm/onvm_mgr/onvm_stats.h:64: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:70: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:77: Lines should be <= 120 characters long [whitespace/line_length] [5]
Total errors found: 3
koolzz
left a comment
There was a problem hiding this comment.
Looked over it, looks good. See suggestions.
…ate_stats Conflicts: onvm/onvm_mgr/onvm_stats.c
|
@kevindweb fixed the conflicts, should be good to merge now |
|
@onvm how many errors are here? |
CI MessageYour results will arrive shortly |
onvm
left a comment
There was a problem hiding this comment.
@onvm how many errors are here?
CI Message
Run successful see results:
✔️ PR submitted to develop branch
✔️ Speed tester performance check passed
❌ Linter Failed (please fix style errors)
[Results from nimbnode30]
- Median TX pps for Speed Tester: 39244590
- Performance rating - 112.13% (compared to 35000000 average)
Linter Output
onvm/onvm_mgr/onvm_stats.h:64: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:68: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:69: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:73: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:75: Lines should be <= 120 characters long [whitespace/line_length] [5]
Total errors found: 5
|
@onvm . |
CI MessageYour results will arrive shortly |
onvm
left a comment
There was a problem hiding this comment.
@onvm .
CI Message
Run successful see results:
✔️ PR submitted to develop branch
✔️ Speed tester performance check passed
❌ Linter Failed (please fix style errors)
[Results from nimbnode30]
- Median TX pps for Speed Tester: 39321769
- Performance rating - 112.35% (compared to 35000000 average)
Linter Output
onvm/onvm_mgr/onvm_stats.h:62: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:63: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:65: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:66: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:67: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:69: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:70: Lines should be <= 120 characters long [whitespace/line_length] [5]
onvm/onvm_mgr/onvm_stats.h:72: Lines should be <= 120 characters long [whitespace/line_length] [5]
Total errors found: 8
This PR features additions and fixes to the onvm_mgr console stats: - Adds NF tag, parent id, core id, children count - Shortens the NF state to a single upper case letter - S (sleeping) or W (working) Commit log: * Added nf tag and core to stats * Made constants for the stats in the header file * Fixed verbose stat line-up * Fixed service id totals stats * Fixed style of output * Fixed shared cpu verbose * Moved print formatters to onvm_stats.h * Fixed up stat lines * Fixed macro styling
This PR features additions and fixes to the onvm_mgr console stats: - Adds NF tag, parent id, core id, children count - Shortens the NF state to a single upper case letter - S (sleeping) or W (working) Commit log: * Added nf tag and core to stats * Made constants for the stats in the header file * Fixed verbose stat line-up * Fixed service id totals stats * Fixed style of output * Fixed shared cpu verbose * Moved print formatters to onvm_stats.h * Fixed up stat lines * Fixed macro styling









Added nf tag from the recent pr, and the core number to manager stats
Summary:
Changed and tested the 3 verbosity levels. Spacing should be fine. Since
nf->tagis no more than 14 characters (excluding\0), the beginning has that many spaces reserved. Core number is similar tosidandiid, so it doesn't change much.Usage:
Run onvm regularly, and add NFs to see them on the
stdoutoutputTODO before merging :
Test Plan:
Review:
@koolzz
(optional) Subscribers: << @-mention people who probably care about these changes >>