Graph file: overhead_retrans_reinj.py
Main fields:
conn.flows[*].attr[co.S2C].get[co.BYTES] # Unique data bytes sent on a subflow from proxy to smartphone
conn.flows[*].attr[co.S2C].get[co.BYTES_RETRANS] # Retransmitted bytes on a subflow from proxy to smartphone
conn.flows[*].attr[co.S2C].get[co.REINJ_ORIG_BYTES] # Reinjected bytes of data originally sent on a subflow from proxy to smartphone
The way to obtain these results can be summarized by the following code.
for conn_id, conn in data.iteritems():
# Initialize retrans_bytes, reinj_data_bytes and total_data_bytes to 0
# Only consider connection using at least two subflows
nb_flows = 0
for flow_id, flow in conn.flows.iteritems():
if flow.attr[co.S2C].get(co.BYTES, 0) > 0:
nb_flows += 1
if nb_flows < 2:
continue
# Count the number of retransmissions and reinjections
for flow_id, flow in conn.flows.iteritems():
retrans_bytes += flow.attr[co.S2C][co.BYTES_RETRANS]
reinj_data_bytes += flow.attr[co.S2C][co.REINJ_ORIG_BYTES]
total_data_bytes += flow.attr[co.S2C][co.BYTES]
# The result for retransmissions is the ratio retransmissions / unique bytes
results[RETRANS].append((retrans_bytes + 0.0) / total_data_bytes)
# The result for reinjections is the ratio reinjections / unique bytes
results[REINJ].append((reinj_data_bytes + 0.0) / total_data_bytes)
To avoid under-estimating the overhead of reinjection, only connections using at least two subflows are considered (i.e., there is at least one data byte on two different subflows).
The retransmission values are computed by tstat whereas the reinjections values come from a post-processing of mptcptrace described in the method process_csv
in the file mptcp.py
.