Also scale numeric values also in summary unless -N is used.

This commit is contained in:
Marek Becka 2018-07-26 10:03:08 -04:00
parent 4dafc2dc05
commit 49587e683b

View File

@ -348,11 +348,11 @@ char bps_str[NUMBER_STRING_SIZE], pps_str[NUMBER_STRING_SIZE], bpp_str[NUMBER_
(long long unsigned)stat_record->numpackets, (long long unsigned)bps, (long long unsigned)stat_record->numpackets, (long long unsigned)bps,
(long long unsigned)pps, (long long unsigned)bpp ); (long long unsigned)pps, (long long unsigned)bpp );
} else { } else {
format_number(stat_record->numbytes, byte_str, DONT_SCALE_NUMBER, VAR_LENGTH); format_number(stat_record->numbytes, byte_str, DO_SCALE_NUMBER, VAR_LENGTH);
format_number(stat_record->numpackets, packet_str, DONT_SCALE_NUMBER, VAR_LENGTH); format_number(stat_record->numpackets, packet_str, DO_SCALE_NUMBER, VAR_LENGTH);
format_number(bps, bps_str, DONT_SCALE_NUMBER, VAR_LENGTH); format_number(bps, bps_str, DO_SCALE_NUMBER, VAR_LENGTH);
format_number(pps, pps_str, DONT_SCALE_NUMBER, VAR_LENGTH); format_number(pps, pps_str, DO_SCALE_NUMBER, VAR_LENGTH);
format_number(bpp, bpp_str, DONT_SCALE_NUMBER, VAR_LENGTH); format_number(bpp, bpp_str, DO_SCALE_NUMBER, VAR_LENGTH);
printf("Summary: total flows: %llu, total bytes: %s, total packets: %s, avg bps: %s, avg pps: %s, avg bpp: %s\n", printf("Summary: total flows: %llu, total bytes: %s, total packets: %s, avg bps: %s, avg pps: %s, avg bpp: %s\n",
(unsigned long long)stat_record->numflows, byte_str, packet_str, bps_str, pps_str, bpp_str ); (unsigned long long)stat_record->numflows, byte_str, packet_str, bps_str, pps_str, bpp_str );
} }