diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2015-11-03 20:06:52 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-11-04 17:31:24 +0100 |
commit | 5906df6771ffe2aafa1b189bffbe82970fb69e56 (patch) | |
tree | 03bbe3fbc92562cbebe6b50618cd234df17f6f06 | |
parent | ec6c809d0368318342a2279c405eb4160e6fb725 (diff) |
flowtop: Show rate in yellow color
It is easier to differentiate bytes/pkts counters with rate counters
if to use different colors.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r-- | flowtop.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -859,13 +859,19 @@ static void presenter_print_counters(uint64_t bytes, uint64_t pkts, printw(" -> ("); attron(COLOR_PAIR(color)); printw("%"PRIu64" pkts", pkts); - if (rate_pkts) + if (rate_pkts) { + attron(COLOR_PAIR(3)); printw("(%.1fpps)", rate_pkts); + attron(COLOR_PAIR(color)); + } printw(", %s", bandw2str(bytes, bytes_str, sizeof(bytes_str) - 1)); - if (rate_bytes) + if (rate_bytes) { + attron(COLOR_PAIR(3)); printw("(%s)", rate2str(rate_bytes, bytes_str, sizeof(bytes_str) - 1)); + attron(COLOR_PAIR(color)); + } attroff(COLOR_PAIR(color)); printw(")"); } |