amari.kpi: Teach LogMeasure to handle x.drb_stats messages
This patch provides next building block for E-UTRAN IP Throughput KPI and continues d102ffaa (drb: Start of the package) 5bf7dc1c (amari.{drb,xlog}: Provide aggregated DRB statistics in the form of synthetic x.drb_stats message) Quoting those patches The scheme to compute E-UTRAN IP Throughput is thus as follows: poll eNB at 100Hz frequency for `ue_get[stats]` and retrieve information about per-UE/QCI streams and the number of transport blocks dl/ul-ed to the UE in question during that 10ms frame. Estimate `tx_time` taking into account the number of transmitted transport blocks. And estimate whether eNB is congested or not based on `dl_use_avg`/`ul_use_avg` taken from `stats`. For the latter we also need to poll for `stats` at 100Hz frequency and synchronize `ue_get[stats]` and `stats` requests in time so that they both cover the same time interval of particular frame. Then organize the polling process to provide aggregated statistics in the form of new `x.drb_stats` message, and teach `xamari xlog` to save that messages to `enb.xlog` together with `stats`. Then further adjust `amari.kpi.LogMeasure` <-- NOTE and generic `kpi.Measurement` and `kpi.Calc` to handle DRB-related data. So here we implement the noted step: We teach LogMeasure to take x.drb_stats messages into account and update IP Throughput related fields in appropriate Measurement from x.drb_stats data. This process is relatively straightforward besides one place: for stable output E-UTRAN IP Throughput is required to be computed without taking into account last TTI of every sample. We don't have that level of details since all we have is total amount of transmitted bytes in a burst and estimation of how long in time the burst is. Thus we can only provide an estimation for the E-UTRAN IP Throughput as follows: DRB.IPVol and DRB.IPTime are collected to compute throughput. thp = ΣB*/ΣT* where B* is tx'ed bytes in the sample without taking last tti into account and T* is time of tx also without taking that sample's tail tti. we only know ΣB (whole amount of tx), ΣT and ΣT* with some error. -> thp can be estimated to be inside the following interval: ΣB ΣB ───── ≤ thp ≤ ───── (1) ΣT_hi ΣT*_lo the upper layer in xlte.kpi will use the following formula for final throughput calculation: DRB.IPVol thp = ────────── (2) DRB.IPTime -> set DRB.IPTime and its error to mean and δ of ΣT_hi and ΣT*_lo so that (2) becomes (1). for this to work we also need to introduce new fields to Measurement that represent error of DRB.IPTime. The hope is that introduction is temporary and should be removed once we rework DRB stats to provide B* and T* directly.
Showing