Remove decimals in test results for IAT, packet lengths and goodput ratio
This commit is contained in:
@@ -1167,7 +1167,7 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa
|
||||
(flow->dst2src_packets > 0) ? "<->" : "->",
|
||||
flow->dst2src_packets, (long long unsigned int) flow->dst2src_bytes);
|
||||
|
||||
fprintf(out, "[Goodput ratio: %.1f/%.1f]",
|
||||
fprintf(out, "[Goodput ratio: %.0f/%.0f]",
|
||||
100.0*((float)flow->src2dst_goodput_bytes / (float)(flow->src2dst_bytes+1)),
|
||||
100.0*((float)flow->dst2src_goodput_bytes / (float)(flow->dst2src_bytes+1)));
|
||||
|
||||
@@ -1190,14 +1190,14 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa
|
||||
fprintf(out, "[bytes ratio: %.3f (%s)]", data_ratio, ndpi_data_ratio2str(data_ratio));
|
||||
|
||||
/* IAT (Inter Arrival Time) */
|
||||
fprintf(out, "[IAT c2s/s2c min/avg/max/stddev: %u/%u %.1f/%.1f %u/%u %.1f/%.1f]",
|
||||
fprintf(out, "[IAT c2s/s2c min/avg/max/stddev: %u/%u %.0f/%.0f %u/%u %.0f/%.0f]",
|
||||
ndpi_data_min(flow->iat_c_to_s), ndpi_data_min(flow->iat_s_to_c),
|
||||
(float)ndpi_data_average(flow->iat_c_to_s), (float)ndpi_data_average(flow->iat_s_to_c),
|
||||
ndpi_data_max(flow->iat_c_to_s), ndpi_data_max(flow->iat_s_to_c),
|
||||
(float)ndpi_data_stddev(flow->iat_c_to_s), (float)ndpi_data_stddev(flow->iat_s_to_c));
|
||||
|
||||
/* Packet Length */
|
||||
fprintf(out, "[Pkt Len c2s/s2c min/avg/max/stddev: %u/%u %.1f/%.1f %u/%u %.1f/%.1f]",
|
||||
fprintf(out, "[Pkt Len c2s/s2c min/avg/max/stddev: %u/%u %.0f/%.0f %u/%u %.0f/%.0f]",
|
||||
ndpi_data_min(flow->pktlen_c_to_s), ndpi_data_min(flow->pktlen_s_to_c),
|
||||
ndpi_data_average(flow->pktlen_c_to_s), ndpi_data_average(flow->pktlen_s_to_c),
|
||||
ndpi_data_max(flow->pktlen_c_to_s), ndpi_data_max(flow->pktlen_s_to_c),
|
||||
|
||||
Reference in New Issue
Block a user