amari.drb: Teach Sampler to be multicell-aware
Since 2a016d48 (Draft support for E-UTRAN IP Throughput KPI) there was a hardcoded limitation that x.drb_stats generation works with 1-cell configurations only. However we do use multicell eNB configurations and on such configurations `xamari xlog x.drb_stats` was failing on eNB side with raise RuntimeError(("ue #%s belongs to %d cells; "+ "but only single-cell configurations are supported") % (ue_id, len(ju(['cells'])))) because an UE might be associated with multiple cells of one eNB due to e.g. Carrier Aggregation. Now, after we did preparatory amari.drb refactoring and taught BitSync to be multicell-aware, we can finally remove the limitation and correct the Sampler to handle UEs associated with multiple cells at the same time. The handling is mostly straightforward: for every frame the Sampler needs to estimate time of active transmission and amount of transmitted bytes. The transmitted amount is Σcell(tx_bytes) and we estimate transmission time on different cells C₁ and C₂ as tx_time ∈ [max(t₁,t₂), min(t₁+t₂, δt/tti)] In other words when transmission to/from UE on C₁ and C₂ is going in parallel in one frame, the time it takes to transmit current part of UEs data 1) cannot be less than time spent on each cell (equals to the maximum if transmission on Ci was fully performed in the same subframes where transmission on Cj was active) 2) cannot be more than the sum of time spent transmitting on each cell (equals to the sum if transmission on C₁ and C₂ was performed in distinct subframes of the frame), and 3) cannot be more than the whole frame (t₁+t₂ could become more than that if there is some overlap in subframes where C₁ and C₂ transmissions were done) The patch implements this logic when updating data flows of an UE. Amari.drb now works for multicell configurations. There are one-cell unit tests for Sampler already added in 2a016d48 and now I manually verified that `xamari xlog x.drb_stats` works ok with multicell eNB configurations. Unittests for Sampler in multicell environment are left as TODO.
Showing
Please register or sign in to comment