EVB::inputStatistics::queueStats

Name

EVB::inputStatistics::queueStats -- Per queue input statistics widget

Synopsis

package require EVB::inputStatistics

EVB::inputStatistics::queueStats window ?options?

$window updateQueue source depth oldest output-count

$window clear

$window reset

DESCRIPTION

Provides a widget that can dipslay per queue input statistics. This is an EVB::utility::sortedWidget, where each of the widgets is an EVB::inputStatistics::queueDisplay widget.

See ::EVB::utility::sortedWidget1evb::EVB::utility::sortedWidgetGeneral key/widget sorted listpackage require EVBUtilitiesEVB::utility::sortedWidget window ?options?$window configure options$window cget ?option-name?$window listids$window getWidget id$window update id value$window resetDESCRIPTIONThis provides a widget that is a generalized version of . Where EVB::utility::sortedPair provides a pair of labels, this widget provides for the use of an aribtray widget in place of the label. (actually EVB::utility::sortedPair is implemented in terms of this widget).A bit of discussion is in order. In order for this widget to work, the client must supply callback scripts (see OPTIONS below). These callback scripts are called to create a value widget, set its internal state and optionally take action just prior to the destruction of a value widget.OPTIONS-titleProvides a title for the entire widget.-lefttitleProvides a title for the left column of the widget pair.-righttitleProvides a title for the right column of the widget.-createProvides a callback script that is called when a new right side widget needs to be created. The desired window name and corresponding key are appended to this script fragment in that order.If this script is not defined at the time the first new widget must be created, an error is thrown.-updateProvides a callback script that is called when a right side widget must be updated. The widget and the value from the update method are appended, in that order, to the script.If this script is not defined at the time the state of a right column widget needs to be filled in, an error will be thrown.-destroyProvides an optional script that is called just prior to the destruction of a right side widget. It is legal to not define this script. You only need to supply it if you are maintaining state external to the widget itself that needs to be cleaned up.The window name and the key id value are both appended to the script in that order.METHODSThe configure and cget methods operate just like all the corresponding methods for Tk widgets.$window listidsLists the set of key (id) values that are currently defined for the widget. These are all the ids for which update was called since the most recent reset call.$window getWidget idGets the widget associated with the key id. If id does not yet exist, an error is thrown.$window update id valueUpdates the widget associated with the key id in the manner dictated by the value. If there is not yet a widget for id the -create script is first called to create it.The actual widget update is accomplished by invoking the -update script. If more than one piece of information is required you can pass a list for value .$window resetDestroys all the id/widget pairs. For each widget, just prior to its destruction, the -destroy script is invoked, if it has been defined. for information about the sortedWidget UI element. See ::EVB::inputStatistics::queueDisplay1evb::EVB::inputStatistics::queueDisplayDisplay input queue statisticspackage require EVB::inputStatistics::EVB::inputStatistics::queueDisplay window ?options?window configure optionswindow cget option-nameDESCRIPTIONProvides a widget that can display input queue statistics. The Widget displays the queue id, the number of fragments in the queue (depth), the timestamp of the element at the head of the queue and the count of the number of elements emitted from the queue.The process maintaining the UI is expected to update the contents of this widget (it does not auto-update). This is done by using the configure method to set the configuration options described in the OPTIONS section below.OPTIONS-idThe id of the input queue. This appears as a title on the inside margin of the widget.-depthSpecifies the number of fragments to display in the Depth statistic for the widget.-oldestSpecifies the timestamp that should appear in the Oldest: statistic of the widget.-outcountSpeicfies the number of fragments that have been output from a queue. This appears as the Out frags statistic. for information about the queueDisplay widget.

OPTIONS

-title

Provides a title for the widget. This is displayed on the upper margin of the widget.

-lefttitle

Provides a title for the source id column of the widget (leftcolumn).

-righttitle

Provides a title for the column that contains the queue display widgets (right column).

METHODS

EVB::inputStatistics::queueStats window ?options?

Creates the widget. The window command parameter is the window name for the top level of the widget hierarchy this creates. This must not be the path to an existing widget.

If options are supplied, they represent configuration options described in the OPTIONS section above.

$window updateQueue source depth oldest output-count

Updates the statistics in a queueDisplay widget. source represents the data source and selects which queueDisplay widget to update. If there is no queueDisplay widget associated with source a new one is made.

The remainder of the parameters are statistics value to put in the widget. depth is intended to be the number of fragments currently in that queue. oldest is intende to be the timestamp of the fragment at the head of the queue and output-count is intended to be the number of fragments that have been removed from the front of the queue (because they were sorted and emitted to the output stage).

$window clear

Zeroes the statistics on all of the output queue widgets. To zero a specific widget use updateQueue and pass in 0 for all of the counter values.

$window reset

Destroys all of the per queue statistics user interface elements.