Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tracecompass-dev] Data Provider Descriptor


I'm currently looking into the function duration statistics data provider. I'm investigating how we could define a statistics data provider generically. Also, I followed  discussions on IRC on the data provider descriptor that describes a data provider. I'm looking at this topic with also the client-server architecture and TSP (Trace Server Protocol) in mind. I'm happy to see interests from different people in this topic. 

First of all, the data provider descriptor (IDataProviderDescriptor), is meant to describe the data provider.  It's meant to give enough information to client users of the data provider to know what they can do with thee data.  It supposed describe what the type the data provider is (XY Chart, Time Graph, Virtual table etc.) and what type of data it provides (tree, XY, states, combinations etc.). It gives a short description and name that can be displayed to users. The current implementation is limited, and only returns the data provider type, description and name. In the implementation, this data is quite static and no data provider instance have to be created. 

Secondly, the function statistics duration data provider, is a tree data provider and doesn't have any XY or time chart associated with. The current implementation provides a list of entries with ID, parent ID and label. This data is dynamic and an instance of the data provider is needed to get it. The support of columns in the tree data provider are defined in the API only, but the Trace Compass UI is not using it at the moment. Special domain specific APIs are provided for that. 

The earlier mentioned API for the columns exists in TmfTreeModel (headers) and labels per column in the TmfTreeDataModel. However, most implementations inheriting from the TmfTreeDataModel (and TmfTreeModel respectively) have not been updated for that. The headers API only has the label, but no description of the data type that the data in column contains. The TmfTreeModel is returned by method ITmfTreeDataProvider#fetchTree() of the tree data provider, and it contains a list of TmfTreeDataModel (one per row).

In my investigation, I'm looking into describing the columns using a column descriptor that will be return instead of the list of header strings. It will give more details on the columns, e.g. what data type it provides, (e.g. string, time, duration, numeric). The description of the columns could be static (I think), but right now a data provider instance needs to be created and fetchTree() call is needed. Not sure how easy it will be to have it part of the IDataProviderDescriptor.

The description of the column is similar what patch ( wants to add to the data provider descriptor (IDataProviderDescriptor). This addition would be specific to XY charts and for a single type series. 

So, I'd like to take the opportunity to start a discussion on how we can describe various types of data provider and what the API should be, that will work in current Trace Compass itself, as well as when using it with the TSP.

Any thoughts? 

Best Regards
Bernd Hufmann

Back to the top