| 480 | } |
| 481 | |
| 482 | inline double |
| 483 | Http2ConnectionState::get_stream_error_rate() const |
| 484 | { |
| 485 | int total = get_stream_requests(); |
| 486 | |
| 487 | if (static_cast<uint32_t>(total) < Http2::stream_error_sampling_threshold) { |
| 488 | return 0; |
| 489 | } |
| 490 | |
| 491 | if (total >= (1 / Http2::stream_error_rate_threshold)) { |
| 492 | return (double)stream_error_count / (double)total; |
| 493 | } else { |
| 494 | return 0; |
| 495 | } |
| 496 | } |
| 497 | |
| 498 | inline Http2ErrorCode |
| 499 | Http2ConnectionState::get_shutdown_reason() const |
no outgoing calls
no test coverage detected