NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

User:DVT/UserDocumentation/DVT Component Reference Guide/DVT TableTree

From Texas Instruments Wiki
Jump to: navigation, search

Enhancements to DVT Table[edit]

High Level Requirements[edit]

Enhance DVT table to provide a way to draw bars/histograms and enable data categorization in a hierarchical tabletree form (similar to DVT Graph). Also provide an alternate way of data categorization through highlighting certain information in the table.

The following requirements (although in plan for dvt table view but) are mainly driven from MSP430/MCU Power Profile project, the summary/profile result views in System Analyzer as well as a call graph for trace.

Draw Bars/Histograms[edit]

Simple case:

  • Visualize a column as a bar/histogram by changing the display settings of the column on any table column.
  • Draw the percentage bar using min/max value autodiscovered from data values as well as a value that user provides as a max for a column
  • Control the color base on the value of data
  • show the value that used for drawing with a different background color.

Power Profile use case /Bruce : Although the powerpoint presentation material used to drive original data coloring requirement might have suggested so, data presented in the tabletree might not be homogeneous. So we would like to be able to

  • Use Node Level in the tree to drive the color not its value
  • Have cell level control because things in same column might be of different nature / empty cells or unrelated data might be presented in the cell.
  • Use Node Level for indentation as well.

Usecase from Imtaz/Bruce/Ralph:

  • Stack bar graphs in a cell with sections colored differently.
    • Pegah's Questions:
      • how to present data values in this case?
      • where the value information is coming from - another cell(s) in the same row or child values in a collapsed tree node in same column?

Usecase from Ralph:

  • Not only control the color but also control the fill pattern of the bar graph (as well as DVT graph state coloring)

Control Background Color[edit]

Power Profile usecase:

  • Row Background color is used to highlight heterogeneous rows or another level of categorization

Usecase from Ralph:

  • Be able to control Row as well as certain cells in the graph

Categorize in TableTree[edit]

  • Table Tree to show summary of information / parent nodes might be populated to show a summary of child nodes
    • Usecase Power Profile and UIA summary views
  • Table Tree where multiple child leaf nodes for the same parent show different occurrences of the same entity
    • Usecase call graph / Pegah's data set in logic analyzer

Pegah: basically a unique identifier in the tree nodes is needed and if two values for the same node is received , thelast one is used and view does not do anything to merge values received. So in the case for multiple leaf nodes, maybe a sequence number or timestamp needs to be used as the unique key

Design Options[edit]

Pegah: So far, it seems that I need to provide "cell" level control as opposed to "column" level control.

Question: as a user of DVT Table Tree are you willing to code? or how much are you willing to code.

Two options were presented:

API driven[edit]

An object with a set of APIs that is used for introspection

Sample prototype was presented A special DVT Buffer where you need to code to construct the tree in your Buffer object, but you have control over every aspect using getter/setter/getInfo

-for the sake of comparison, the prototype was similar to DGT project/Ralph -Another example, without introspection is a similar approach as ROV took by defining APIs instead of introspection

Data Driven[edit]

Similar to DVT Graph use '.' notation where data in a field dictates the structure of tree node (we call this as a key because it needs to be unique)

  • User may pick multiple columns instead of '.' notation to specify how key needs to be constructed.
  • User to be able to configure a different character in case of dot-separated approach on single key field.

Use a single metadata column/field for presentation of cells in the row which describes presentation style of row or individual cells in the row

  • Control background color of the row, control how a bar is drawn in a cell (stacked/simple), icon indicator, number format, alignment...
  • Come up with a syntax to specify presentation - (pegah: this meta data field that describes the cells is comparable dvt format where we defined meta data for how to parse/construct fields)
  • When this special meta data field is populated, it will be used to draw but User might choose to override this by specifying a different "column setting" (it also can be exported and re-imported like any other field to preserve drawing logic for cells say in csv format)

Design Decisions / Thoughts[edit]

So far option number two (Data Driven) seems to require less coding - you still need to prepare data in a certain way but no need for special buffer/object and covers requirements we see for power profile and profile summaries.

Data Driven option was chosen.

Design[edit]

Syntax for Presentation[edit]

A new property is added to pick the column to be used for presentation type called "Presentation" The value of this field specifies how the row needs to be drawn.

The syntax resembles CSS (cascading style sheet):

fieldNameA { attribute1: value1; attribute2: value2; ... },
fieldNameB { attribute1: value1 } ,
...

To control the complete row, the special fieldName, ROW will be used

Background Color[edit]

Attribute: bgcolor

value: #RRGGBB (hex)

Example CSV:

Name:string,Total:ulong,Presentation:string,
HWI,0,,
SWI,20,"ROW{bgcolor:#ccffff;}",
Thread1,10,"Total {bgcolor:#aabbff;}",
Thread2,5,"Name{bgcolor:#00bbff;},Total{bgcolor:#00bbff;}"
Name Total Presentation
HWI 0
SWI 20 ROW{bgcolor:#ccffff;}
Thread1 10 Total {bgcolor:#aabbff;}
Thread2 5 Name{bgcolor:#00bbff;},Total{bgcolor:#00bbff;}

Note: it is recommended to hide the presentation column.

Foreground Color[edit]

Attribute: fgcolor

value: #RRGGBB (hex)


Icon[edit]

Attribute: icon

value: iconName

Available icon names / images are configured using dvt\icons.txt file

Horizontally Stacked Bar[edit]

Attribute: bar

value: percentage1#RRGGBB|percentage2#RRGGBB|percentage3#RRGGBB|... (hex)

Vertically Stacked Bar[edit]

Attribute: vbar

value: percentage1#RRGGBB|percentage2#RRGGBB (hex)

Due to vertical space restrictions of a cell, only two vertically stacked bars can be drawn

Sample Usage after Implementation[edit]

Function profiler bar

function profiler icons