package require EVBRestUI InputStatesView view1 ?option value ...? view1 configure option value ?...?
The EVBRestUI package provides Tcl views that can be used to build up user interfaces that monitor event builder statistics from the orderer stage of the pipeline. A number of sni::widgetadaptor classes are defined, each with a ttk::frame installed as its hull.
While the views are intended for use with models that get data from the Event Builder's REST interface, theoretically any model that can have its data massaged into an appropriate format could be used.
The remaining sections describe each of the views its options and, if it has any public methods.
Provides a view that displays input statistics. This provides
a single configuration option -inputstats
which
accepts and produces a dict with the following key/value pairs:
Timestamp of the oldest fragment still in flight.
Timestamp of the newest fragment still in flight.
The number of fragments queued in the input queues.
The QueuStatsView widget provides queue statistcs that come from e.g. the REST interface. These are displayed in a table with the following headings:
The id of the queue described on any row of the table.
Number of fragments in the queue
The timestamp of the oldest fragment in the queue (fragment at the front).
Total number of bytes queued.
Total number of bytes that have ever been dequeued.
Total number of fragments that have evern been queued.
This information is communicated to the view via the -queuestats
option which is a list of dicts. Each dict providing the input statistics
for one queue with the same dictionary keys as the column headings.
BarrierStatsView
provides a top level view
of the barrier events that have been processed by the orderer.
A barrier event is a synchronization device. When a barrier
fragment is seen in a queue, no futher fragments can be dequeued
from that queue until there are barrier events in all queues.
Barrier fragments have a barrier type. If the barriers that resolve synchronization have the same type (normal), the barrier is said to be homogenous. If the barrier fragments have differing types the barrier is said to be heterogeneous.
If a barrier is not completely resolved within a timeout, the barrier is said to be a partial barrier.
The object data are configured via the -barrierstats
option. The value of this option is a dict with the keys
complete and incommplete.
The values of these keys are themselves
dict with identical keys:
Total number of barriers.
Number of homogeneous barriers. Normally this should be the same as the value of barriers
Number of heterogenous barriers.
The CompleteBarrierView
megawidget provides
a view for the detailed statistics associated with complete barriers.
A tree view is used to display these data with the ability to drill down
into per source or per barrier type information.
The display reflects the contents of the
-completebarrierdetails
configuration option.
This must be a dict with the keys bytype which
describes barrier statistics by barrier types
and bySource which provides barrier statistics
organized by data source.
The value of the bytype key is a list of dicts Each dict contains keys type which is a barrier type that has been seen and count which contains the number of times that barrier type has occured,
The value of the bySource key is a list of dicts each describing barrier statistics for a data source. Each element of the list is a dict that has the following keys: id the source id, count the number of barriers from that source id and details.=
The value of the details key is itslef a list of dicts that have the keys type which contains a barrier type received from that source and count the number of times that source contributed a barrier of that type.
This megawidget provides a vew that displays statistics from
incomplete barriers. Ideally, this view should be empty as all
barriers should, normally, be complete.
The view displays a tree view whose contents are configured
from the -incompletedetails
option.
The value of this option must be a dict with two keys: histogram and bysource.
The histogram key contains a list of dicts that represents a histogram of the number of times a specific number of barrier fragments was missing from a barrier. Each dict contains the keys number which is the number of missing barrier fragments and count which is the number of times that number of fragments was missing. There will be no entries where the value of count is zero.
The bysource key contains a list that describes the number of times data source ids did not contribute a barrier fragment. Each element of the list is a dict that contains the keys id, a source id and count the number of times that source id did not contribute a barrier fragment to an incomplete barrier.
Provides a view of data late statistics. Data late conditions occur
when a fragment arrives at a queue after earlier fragments have already been
emitted. The rendition of this view is a tree. The contents
of the tree reflect the value of the
-datalatestatistics
option.
The value of this is a dict containing the keys: count which has the number of data late incidents, worst which has the worst case timestamp discrepancy to date and details which contains more detailed information
The details key contains a list of dicts. Each element of the list describes the data late statistics from a single data source. The elements of the list are dicts with the following keys: id the data source being described. count the number of data late incidents observed in that data source and worst the worst case timestamp discrepancy from the data lates on that source observed to date.
Out of order fragments are those which must be emitted out of global time ordering. This can be the result of data late fragments, sort failures or queue to queue timing problems.
This view takes the form of a tree who's contents are configured via
the object's -oostatistics
option. The value of
this must be a dict with the following keys: summary
contains summary statistics and bysource contains
detailed statistics organized by data source
The summary key value is a dict containing the following keys:
Total number of out of order fragments.
Timestamp prior to the most recent offending fragment.
Timestamp of the most recent offending fragment.
The value of the bysource key is a list of dicts. Each element of the list is a dict that provides information about the out of order fragments from some data source that had at least one such fragment. The dicts have the following keys:
Source id of the information that's included in this dict.
Number of out of order fragments in this queue.
Timestamp prior to the most recent offending fragment.
Timestamp of the most recent offending fragment.
Data are transmitted to the event builder ordering phase by
TCP/IP clients. This view provides a presentation of connected
clients. It provides a table of the connections. The contents of
the table reflect the contents of the -connections
option.
The -connections
value is a list of dicts.
Each dict describes a single connection. The dicts contain the following
keys:
Host from which the connection has been made.
A description string that was provided when the connection was made.
The connection state.
True if the connection has not sent data in some long period of time.