All Classes Namespaces Files Functions Pages
ByteBlowerPort.ResultHistory Class Reference

Port counter result history. More...

Methods

 Clear
 Removes the locally stored history snapshots. More...
 
 Cumulative.Get
 Returns a list of available cumulative counters. More...
 
 Cumulative.GetByIndex
 Returns a single item of the cumulative list. More...
 
 Cumulative.GetByTime
 Returns a single item of the cumulative list using a timestamp nanoseconds. More...
 
 Cumulative.Latest.Get
 Returns latest closed item of the cumulative list. More...
 
 Cumulative.Length.Get
 Returns the size of the cumulative list. More...
 
 Description.Get
 Returns a textual description of the object.
 
 Interval.Get
 Returns a list of available interval counters. More...
 
 Interval.GetByIndex
 Returns a single item of the interval list. More...
 
 Interval.GetByTime
 Returns a single item of the interval list using a timestamp in nanoseconds. More...
 
 Interval.Latest.Get
 Returns the latest closed item of the interval list. More...
 
 Interval.Length.Get
 Returns the size of the interval list. More...
 
 Parent.Get
 Returns the parent object.
 
 Refresh.Timestamp.Get
 Returns the timestamp on the server when the current history is requested. More...
 
 Refresh
 Refreshes the counters. This will retrieve the latest interval and accumulated counters available. More...
 
 Sampling.BufferLength.Get
 Number of samples to keep in the buffer. More...
 
 Sampling.BufferLength.Set
 Sets the number of samples to keep in the buffer. More...
 
 Sampling.Interval.Duration.Get
 Duration of one sampling interval in nanoseconds. More...
 
 Sampling.Interval.Duration.Set
 Sets the duration of one sampling interval. More...
 

Class overview

Port counter result history.

The port counter history is - as always - available in two flavors: the cumulative and the interval results

Note
The information is not updated until Refresh is called
See History result for more information.

A result history object can be created via a ByteBlowerPort, using ByteBlowerPort::Result.History.Get

Example

Receive all frames on "trunk-1-2" of some server, matching UDP source or destination port 67.

1 set port [ $server Port.Create "trunk-1-2" ]
2  set history [ $port Result.History.Get ]
3  $history Interval.Get
4  $history Refresh
5  $history Interval.Get
6  $history Sampling.Interval.Duration.Get
7  $history Sampling.BufferLength.Get

Definition at line 955 of file api.tcl.

Method documentation

ByteBlowerPort.ResultHistory::Clear

Removes the locally stored history snapshots.

This can be used to save memory in long tests where the results are requested at regular intervals.

WARNING: Any interval or cumulative result object returned from this history object before calling Clear will be destroyed and thus become unusable.

Definition at line 965 of file api.tcl.

ByteBlowerPort.ResultHistory::Cumulative.Get

Returns a list of available cumulative counters.

Returns
List of ByteBlowerPort.ResultData containing the Interval counters
Example

This example gets the available cumulative counters

1 $historyObject Cumulative.Get

Returns:

[ <ByteBlowerPort.ResultData object> ... ] 

Definition at line 977 of file api.tcl.

ByteBlowerPort.ResultHistory::Cumulative.GetByIndex

Returns a single item of the cumulative list.

Returns
ByteBlowerPort.ResultData cumulative counter object at the specified index
Example

This example gets the available cumulative counters

1 $historyObject Cumulative.GetByIndex 1

Returns:

<ByteBlowerPort.ResultData object> 

Definition at line 989 of file api.tcl.

ByteBlowerPort.ResultHistory::Cumulative.GetByTime

Returns a single item of the cumulative list using a timestamp nanoseconds.

Since
API 2.2
Example

This example gets the available cumulative counters

1 $historyObject Cumulative.GetByTime 123s
2  $historyObject Cumulative.GetByTime 123000000us
3  $historyObject Cumulative.GetByTime 123000000000ns
4  $historyObject Cumulative.GetByTime 123000000000

Returns:

<ByteBlowerPort.ResultData object> 

Definition at line 1004 of file api.tcl.

ByteBlowerPort.ResultHistory::Cumulative.Latest.Get

Returns latest closed item of the cumulative list.

Returns
The latests closed ByteBlowerPort.ResultData cumulative counter object.
Since
API 2.2
Example

This example gets the available cumulative counters

1 $historyObject Cumulative.Latest.Get

Returns:

<ByteBlowerPort.ResultData object> 

Definition at line 1018 of file api.tcl.

ByteBlowerPort.ResultHistory::Cumulative.Length.Get

Returns the size of the cumulative list.

Returns
The length of the cumulative list
Example
1 $historyObject Cumulative.Length.Get

Returns:

32 

Definition at line 1030 of file api.tcl.

ByteBlowerPort.ResultHistory::Interval.Get

Returns a list of available interval counters.

Returns
List of ByteBlowerPort.ResultData containing the Interval counters
Example

This example gets the available interval counters

1 $historyObject Interval.Get

Returns:

[ <ByteBlowerPort.ResultData object> ... ] 

Definition at line 1047 of file api.tcl.

ByteBlowerPort.ResultHistory::Interval.GetByIndex

Returns a single item of the interval list.

Returns
ByteBlowerPort.ResultData interval counter object at the specified index
Example

This example gets the available interval counters

1 $historyObject Interval.GetByIndex 1

Returns:

<ByteBlowerPort.ResultData object> 

Definition at line 1059 of file api.tcl.

ByteBlowerPort.ResultHistory::Interval.GetByTime

Returns a single item of the interval list using a timestamp in nanoseconds.

Since
API 2.2
Example

This example gets the available interval counters

1 $historyObject Interval.GetByTime 123s
2  $historyObject Interval.GetByTime 123000000us
3  $historyObject Interval.GetByTime 123000000000ns
4  $historyObject Interval.GetByTime 123000000000

Returns:

<ByteBlowerPort.ResultData object> 

Definition at line 1074 of file api.tcl.

ByteBlowerPort.ResultHistory::Interval.Latest.Get

Returns the latest closed item of the interval list.

Returns
The latests closed ByteBlowerPort.ResultData interval counter object.
Since
API 2.2
Example

This example gets the available interval counters

1 $historyObject Interval.Latest.Get

Returns:

<ByteBlowerPort.ResultData object> 

Definition at line 1088 of file api.tcl.

ByteBlowerPort.ResultHistory::Interval.Length.Get

Returns the size of the interval list.

Returns
The length of the interval list
Example
1 $historyObject Interval.Length.Get

Returns:

32 

Definition at line 1100 of file api.tcl.

ByteBlowerPort.ResultHistory::Refresh

Refreshes the counters. This will retrieve the latest interval and accumulated counters available.

Note
WARNING: This affects all users on the same ByteBlower interface.
Example

Refreshing the counters

1 $historyObject Refresh

Definition at line 1129 of file api.tcl.

ByteBlowerPort.ResultHistory::Refresh.Timestamp.Get

Returns the timestamp on the server when the current history is requested.

Returns
Timestamp on the server when the current history is requested in nanoseconds since epoch
Example
1 $historyObject Refresh.Timestamp.Get

Returns:

1432805398000000000 

Definition at line 1117 of file api.tcl.

ByteBlowerPort.ResultHistory::Sampling.BufferLength.Get

Number of samples to keep in the buffer.

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method gets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Returns
The length of the sample buffer
Example
1 $historyObject Sampling.BufferLength.Get

Returns:

6 

Definition at line 1143 of file api.tcl.

ByteBlowerPort.ResultHistory::Sampling.BufferLength.Set

Sets the number of samples to keep in the buffer.

The ByteBlower server has a buffer to keep some samples before they are transferred to the client. This method sets the maximum number of samples the server can hold. The last sample will always be the running sample. When a sample is closed, the oldest sample in the buffer will be removed.

Since
2.3.0
Example
1 $historyObject Sampling.BufferLength.Set 6

Definition at line 1157 of file api.tcl.

ByteBlowerPort.ResultHistory::Sampling.Interval.Duration.Get

Duration of one sampling interval in nanoseconds.

Returns
Duration in nanoseconds
Example
1 $historyObject Sampling.Interval.Duration.Get

Returns:

1000000000 

Definition at line 1169 of file api.tcl.

ByteBlowerPort.ResultHistory::Sampling.Interval.Duration.Set

Sets the duration of one sampling interval.

Note
WARNING: This affects all users on the same ByteBlower interface.
WARNING: The previously collected history will be invalidated.
Since
2.3.0
Example
1 $historyObject Sampling.Interval.Duration.Set 1000000000
Example
1 $historyObject Sampling.Interval.Duration.Set 1s

Definition at line 1185 of file api.tcl.