webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Functions | Variables
misc Namespace Reference

Functions

def count_reordered (sequence_numbers)
 
def ssrc_normalized_size_table (data_points)
 
def normalize_counter (counter)
 
def unwrap (data, mod)
 
def ssrc_directions (data_points)
 

Variables

 get_input = raw_input
 

Function Documentation

◆ count_reordered()

def misc.count_reordered (   sequence_numbers)
Returns number of reordered indices.

A reordered index is an index `i` for which sequence_numbers[i] >=
sequence_numbers[i + 1]

◆ normalize_counter()

def misc.normalize_counter (   counter)
Returns a normalized version of the dictionary `counter`.

Does not modify `counter`.

Returns:
  A new dictionary, in which every value in `counter`
  has been divided by the total to sum up to 1.

◆ ssrc_directions()

def misc.ssrc_directions (   data_points)

◆ ssrc_normalized_size_table()

def misc.ssrc_normalized_size_table (   data_points)
Counts proportion of data for every SSRC.

Args:
   data_points: list of pb_parse.DataPoint

Returns:
   A dictionary mapping from every SSRC in the data points. The
   value of an SSRC `s` is the proportion of sizes of packets with
   SSRC `s` to the total size of all packets.

◆ unwrap()

def misc.unwrap (   data,
  mod 
)
Returns `data` unwrapped modulo `mod`. Does not modify data.

Adds integer multiples of mod to all elements of data except the
first, such that all pairs of consecutive elements (a, b) satisfy
-mod / 2 <= b - a < mod / 2.

E.g. unwrap([0, 1, 2, 0, 1, 2, 7, 8], 3) -> [0, 1, 2, 3,
4, 5, 4, 5]

Variable Documentation

◆ get_input

misc.get_input = raw_input