* check if drop rate matches drop probability within tolerance */
| 232 | * check if drop rate matches drop probability within tolerance |
| 233 | */ |
| 234 | static int check_drop_rate(double *diff, double drop_rate, double drop_prob, double tolerance) |
| 235 | { |
| 236 | double abs_diff = 0.0; |
| 237 | int ret = 1; |
| 238 | |
| 239 | abs_diff = fabs(drop_rate - drop_prob); |
| 240 | if ((int)abs_diff == 0) { |
| 241 | *diff = 0.0; |
| 242 | } else { |
| 243 | *diff = (abs_diff / drop_prob) * 100.0; |
| 244 | if (*diff > tolerance) { |
| 245 | ret = 0; |
| 246 | } |
| 247 | } |
| 248 | return ret; |
| 249 | } |
| 250 | |
| 251 | /** |
| 252 | * check if average queue size is within tolerance |
no outgoing calls
no test coverage detected