• Kirill Smelkov's avatar
    amari.drb: Add _CTXBytesSplitter to split total tx_bytes into per-cell parts · 9cd06cb9
    Kirill Smelkov authored
    To be able to compute E-UTRAN IP Throughput amari.drb uses Sampler which
    detects and extracts separate transmission samples from 100Hz log of
    ue_get[stats]. The Sampler, in turn uses help from _BitSync for correct
    operations because Amarisoft LTEENB updates counters for dl_total_bytes
    and dl_tx at different times, and _BitSync synchronizes streams of those
    updates in time. _BitSync itself works by correlating amount of
    transmitted data (tx_bytes) and transport blocks (#tx) and shifting some
    amount of #tx to previous frame based on the correlation. See d102ffaa
    (amari.drb: Start of the package) for details.
    
    This works ok for configurations with 1 cell, but does not work out of the box
    for multicell configurations because #tx is per-cell value, while e.g.
    dl_total_bytes is reported by LTEENB only as a value aggregated over all cells.
    That's why original implementation in d102ffaa had an assert that the
    number of cells an UE is associated with is 1.
    
    -> Implement custom filter that splits overall tx_bytes into per-cell
       parts via heuristic based on reported per-cell bitrates to workaround
       that: the more cell bitrate is the more is the part of tx_bytes that
       gets associated to this cell.
    
    In basic implementation the heuristic would be to divide tx_bytes as
    
    	tx_bytes(cell) = tx_bytes·β/Σcells(β)		; β is bitrate of a cell
    
    but given that for every frame _BitSync works by computing things based
    on neighbour frame as well we do it as
    
    	tx_bytes(cell) = tx_bytes·(β₁+β₂)/Σcells(β₁+β₂)
    
    This should make the heuristic a bit more stable.
    
    This patch comes with tx_bytes splitter filter itself only. In the next
    patch we will use _CTXBytesSplitter to implement multicell-awareness for
    _BitSync.
    9cd06cb9
drb.py 38.5 KB