Skip to content

caret_analyze#

caret_analyze is a set of packages that helps users to load trace data and architecture objects and provides Python APIs for configuration and evaluation.

See CARET analyze API document for the definition of each class.

The following figure shows data flow in caret_analyze.

caret_analyze_architecture

A set of trace data is divided into two sections after being loaded onto memory; architecture object and runtime data.

Architecture object includes descriptions of the target application's structure. This object can be reused unless the structure of the target application or names of the components is changed.

Runtime data object has data sampled during the execution of the target application. The sampled data includes timestamps, whose values are different per execution, obtained from tracepoints. Runtime data is combined with architecture and provided to developers via Python-API which is easy to evaluate.

Architecture object and runtime data are instantiated from respective Python classes. Structure of their classes is designed based on that of ROS applications which are constructed of executors, nodes, callback functions, and topic messages. ROS-based structure makes CARET's API friendly for ROS users.

caret_analyze is composed of several python packages. Each python packages are as follows.

python package role
architecture Load and configure an architecture object
runtime Provide execution data
value_objects Collection of value objects
plot Visualization helpers
records Implementation of records
common Common or helper functions
infra Import external files

Each of the packages has interrelation with other as shown in the following diagram.

uml diagram

Architecture object provides APIs to search inter-node paths and define intra-node data paths as mentioned in configuration chapter. The architecture object is reusable after it is saved as a YAML-based file called "architecture file".

Runtime data provides APIs to retrieve pandas.DataFrame-based objects including callback latency or communication. Users can analyze temporal aspects of their applications, with visualization, as they expect. APIs for visualization are also served by caret_analyze which plays the main role to visualize trace data.

In the following sections, each package will be explained in more detail.

architecture#

The purpose of architecture is to define static information for visualization.

architecture package serves classes which embody architecture object. Architecture object has one or more sub components. There are several types of components; executor, node, callback and topic. CARET serves a class to each type of component and manages them in architecture package.

A target application, which is represented with architecture class, has several sub components. An architecture-based object has several types of sub components as well.

Info

"Model" might be more appropriate than the name "Architecture". Architecture describes all the parameters related to scheduling, such as scheduling and core migration. Therefore, we're thinking that the architecture can be used for design based on scheduling theory.

uml diagram

All sub objects retrieved from the Architecture object are constructed from ValueObject, which is suitable for interfacing data with other packages.

runtime#

runtime a package to hold trace data, whose object has similar data structure to that of Architecture object. Objects instantiated from runtime package have function to return time-series data which are used for calculating frequency or latency.

uml diagram

The following is a list of each class. Some of them are able to return measured data.

Class API has measured data definition?
Application API list No
Executor API list No
Node API list No
Path API list Yes (Definitions)
NodePath API list Yes (Definitions)
Communication API list Yes (Definitions)
Timer API list Yes (Definitions)
Subscription API list Yes (Definitions)
Callback API list Yes (Definitions)

value_objects#

value_objects define classes with equivalence. The Value class has the information for binding, and the StructValue class has the structure of multiple classes after binding.

plot#

plot package has classes associated with visualization. The visualization methods provided by caret_analyze depends on bokeh and graphviz.

records#

latency is calculated by joining process of tables uniquely defined. records package serves functions to make the tables with their own join processing.

See also

common#

Common package implements individual processes are described that can be handled as common in each package.

infra#

infra package serves readers for an architecture object and trace data.

It contains YAML and LTTng modules which implement ArchitectureReader/RuntimeDataProvider respectively.