Module Contents

class DefaultStreaming(streaming_threshold=30)


The default streaming strategy. It uses the total count of a segment’s children subsegments as a threshold. If the threshold is breached, it uses subtree streaming to stream out.

is_eligible(self, segment)

A segment is eligible to have its children subsegments streamed if it is sampled and it breaches streaming threshold.

stream(self, entity, callback)

Stream out all eligible children of the input entity.

  • entity – The target entity to be streamed.
  • callback – The function that takes the node and actually send it out.
_stream(self, entity, callback)