| 96 | } |
| 97 | |
| 98 | inline uint64_t FlowGen::NextFlowArrival() { |
| 99 | switch (arrival_) { |
| 100 | case Arrival::kUniform: |
| 101 | return flow_gap_ns_; |
| 102 | case Arrival::kExponential: |
| 103 | return -log(rng_.GetRealNonzero()) * flow_gap_ns_; |
| 104 | default: |
| 105 | CHECK(0); |
| 106 | } |
| 107 | return 0; |
| 108 | } |
| 109 | |
| 110 | // should never fail, always returning a non-null pointer |
| 111 | inline flow *FlowGen::ScheduleFlow(uint64_t time_ns) { |
nothing calls this directly
no test coverage detected