Documentation ¶
Index ¶
- Constants
- type AvailableCounters
- type ByteCopyCounters
- type ByteCopyCountersOut
- type Counter
- type LatencyJitterCounter
- type LatencyJitterCounterOut
- type PNGCopyCounters
- type PNGCopyCountersOut
- type PacketCounters
- type TCPState
- type TCPStateOut
- type VideoCounters
- type VideoCountersOut
- type VideoSegment
Constants ¶
const ( HeadersOnly uint8 = 0 AllLayers uint8 = 1 PayloadOnly uint8 = 2 )
const ( // QUICHeaderLen represents the minimum length in bytes to determine when a // QUIC upstream packet contains payload QUICHeaderLen = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailableCounters ¶
type AvailableCounters struct {
// contains filtered or unexported fields
}
AvailableCounters is a structure containing available Counter types
func (*AvailableCounters) Build ¶
func (ac *AvailableCounters) Build(counters []string) (map[string]int, error)
Build iterates over the counter names that the program plans on using. If no type with such name is found or if the data type is not a counter interface an error is raised
func (*AvailableCounters) InstantiateById ¶
func (ac *AvailableCounters) InstantiateById(counterId int) (Counter, error)
InstantiateById instantiates a new Counter of the type associated with code counterId
func (*AvailableCounters) InstantiateByName ¶
func (ac *AvailableCounters) InstantiateByName(counterName string) (Counter, error)
InstantiateByName instantiates a new Counter of type with name counterName
type ByteCopyCounters ¶
type ByteCopyCounters struct { CopiedBytes int32 StoredBytes int32 ToCopy int32 Layers uint8 Data []byte }
ByteCopy is a data structure to collect packet and byte counters
func (*ByteCopyCounters) AddPacket ¶
func (c *ByteCopyCounters) AddPacket(pkt *network.Packet)
AddPacket increment the counters based on information contained in pkt
func (*ByteCopyCounters) Collect ¶
func (c *ByteCopyCounters) Collect() []byte
Collect returns a []byte representation of the counter
func (*ByteCopyCounters) Type ¶
func (c *ByteCopyCounters) Type() string
Type returns a string with the type name of the counter.
type ByteCopyCountersOut ¶
type Counter ¶
type Counter interface { // Updates the flow states based on the packet AddPacket(pkt *network.Packet) error // Reset resets the counter statistics for periodic counting. // This function triggers at the "emit" time. Reset() error // Clear re-initializes the counter to its zero state Clear() error // Type returns a string with the type name of the counter. Type() string // Collect returns a []byte representation of the counter Collect() []byte }
Counter is a general counter interface. Functions that all flow type structures have to implement.
type LatencyJitterCounter ¶
type LatencyJitterCounter struct { RTT welford.Welford Jitter welford.Welford // contains filtered or unexported fields }
LatencyJitterCounter is a data structure to collect packet and byte counters
func (*LatencyJitterCounter) AddPacket ¶
func (c *LatencyJitterCounter) AddPacket(pkt *network.Packet) error
func (*LatencyJitterCounter) Clear ¶
func (c *LatencyJitterCounter) Clear() error
func (*LatencyJitterCounter) Collect ¶
func (c *LatencyJitterCounter) Collect() []byte
Collect returns a []byte representation of the counter
func (*LatencyJitterCounter) Reset ¶
func (c *LatencyJitterCounter) Reset() error
func (*LatencyJitterCounter) Type ¶
func (c *LatencyJitterCounter) Type() string
Type returns a string with the type name of the counter.
type LatencyJitterCounterOut ¶
type PNGCopyCounters ¶
type PNGCopyCounters struct { CopiedBytes int32 StoredBytes int32 ToCopy int32 Layers uint8 Image *image.Gray Buffer *bytes.Buffer Created bool }
ByteCopy is a data structure to collect packet and byte counters
func (*PNGCopyCounters) AddPacket ¶
func (c *PNGCopyCounters) AddPacket(pkt *network.Packet)
AddPacket increment the counters based on information contained in pkt
func (*PNGCopyCounters) Collect ¶
func (c *PNGCopyCounters) Collect() []byte
Collect returns a []byte representation of the counter
func (*PNGCopyCounters) Type ¶
func (c *PNGCopyCounters) Type() string
Type returns a string with the type name of the counter.
type PNGCopyCountersOut ¶
type PacketCounters ¶
PacketCounters is a data structure to collect packet and byte counters
func (*PacketCounters) AddPacket ¶
func (c *PacketCounters) AddPacket(pkt *network.Packet) error
AddPacket increment the counters based on information contained in pkt
func (*PacketCounters) Clear ¶
func (c *PacketCounters) Clear() error
Clear clears all counters (same behavior as reset)
func (*PacketCounters) Collect ¶
func (c *PacketCounters) Collect() []byte
Collect returns a []byte representation of the counter
func (*PacketCounters) Type ¶
func (c *PacketCounters) Type() string
Type returns a string with the type name of the counter.
type TCPState ¶
type TCPState struct { AckUpCounter int64 AckDownCounter int64 SynUpCounter int64 SynDownCounter int64 RstUpCounter int64 RstDownCounter int64 PushUpCounter int64 PushDownCounter int64 UrgUpCounter int64 UrgDownCounter int64 BytesUpCounter int64 BytesDownCounter int64 RetrUpCounter int64 RetrDownCounter int64 OOOUpCounter int64 OOODownCounter int64 UpRecWindow welford.Welford DownRecWindow welford.Welford UpBytesPerPkt welford.Welford DownBytesPerPkt welford.Welford UpBytesInFlight welford.Welford DownBytesInFlight welford.Welford RTT welford.Welford // contains filtered or unexported fields }
TCPState is a data structure to collect packet and byte counters
type TCPStateOut ¶
type TCPStateOut struct { AckUpCounter int64 AckDownCounter int64 SynUpCounter int64 SynDownCounter int64 RstUpCounter int64 RstDownCounter int64 PushUpCounter int64 PushDownCounter int64 UrgUpCounter int64 UrgDownCounter int64 BytesUpCounter int64 BytesDownCounter int64 RetrUpCounter int64 RetrDownCounter int64 OOOUpCounter int64 OOODownCounter int64 UpRecWindowAvg float64 DownRecWindowAvg float64 UpBytesPerPktAvg float64 DownBytesPerPktAvg float64 UpBytesInFlightAvg float64 DownBytesInFlightAvg float64 RTTAvg float64 UpRecWindowVar float64 DownRecWindowVar float64 UpBytesPerPktVar float64 DownBytesPerPktVar float64 UpBytesInFlightVar float64 DownBytesInFlightVar float64 RTTVar float64 }
type VideoCounters ¶
type VideoCounters struct { UpstreamChunks []VideoSegment RunningUpstream VideoSegment }
func (*VideoCounters) AddPacket ¶
func (vf *VideoCounters) AddPacket(pkt *network.Packet) error
AddPacket updates the flow states based on the packet pkt
func (*VideoCounters) Collect ¶
func (c *VideoCounters) Collect() []byte
Collect returns a []byte representation of the counter
func (*VideoCounters) Reset ¶
func (vf *VideoCounters) Reset() error
Reset resets the flow statistics
func (*VideoCounters) Type ¶
func (c *VideoCounters) Type() string
Type returns a string with the type name of the counter.
type VideoCountersOut ¶
type VideoCountersOut struct {
VideoSegments []VideoSegment
}