* check if average queue size is within tolerance */
| 252 | * check if average queue size is within tolerance |
| 253 | */ |
| 254 | static int check_avg(double *diff, double avg, double exp_avg, double tolerance) |
| 255 | { |
| 256 | double abs_diff = 0.0; |
| 257 | int ret = 1; |
| 258 | |
| 259 | abs_diff = fabs(avg - exp_avg); |
| 260 | if ((int)abs_diff == 0) { |
| 261 | *diff = 0.0; |
| 262 | } else { |
| 263 | *diff = (abs_diff / exp_avg) * 100.0; |
| 264 | if (*diff > tolerance) { |
| 265 | ret = 0; |
| 266 | } |
| 267 | } |
| 268 | return ret; |
| 269 | } |
| 270 | |
| 271 | /** |
| 272 | * initialize the test rte_red config |
no outgoing calls
no test coverage detected