Struct libdata::stats::Sizes []

pub struct Sizes {
    pub dir_in: Size,
    pub dir_out: Size,
}

A poorer version of Stats

This one contains only the number of packets and the size. It is used during the construction of the flow slice and the other statistics are added later on.

Because the duration and the fact it relates to a single flow is known during the conversion, the other statistics are not needed and this makes it easier to manipulate.

Fields

The inbound direction.

The outbound direction.

Methods

impl Sizes

Expands into full Stats

Params

  • start: The absolute time when the flow slice starts. This is either start of the slice, or start of the flow if it starts inside the slice.
  • end: The opposite of start.
  • speed_duration: The duration of the flow slice used for speed computation. Due to some issues with summing maximal and average speeds, this is not always the same as end - start.
  • started: Did the flow start in this slice?

Checks if other is equal or smaller in each subfield.

This basically checks if it is safe to do self - other.

Trait Implementations

impl Add for Sizes

The resulting type after applying the + operator

The method for the + operator

impl AddAssign for Sizes

The method for the += operator

impl Clone for Sizes

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Sizes

Formats the value using the given formatter.

impl Default for Sizes

Returns the "default value" for a type. Read more

impl Eq for Sizes

impl PartialEq for Sizes

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Sub for Sizes

The resulting type after applying the - operator

The method for the - operator