Interface IWeightedTreeProvider<N,E,T extends WeightedTree<N>>

Type Parameters:
N - The type of objects represented by each node in the tree
E - The type of elements used to group the trees. If this type extends ITree, then the elements and their associated weighted trees will be grouped in a hierarchical style
T - The type of the tree provided
All Known Subinterfaces:
ICallGraphProvider
All Known Implementing Classes:
DifferentialWeightedTreeProvider, InstrumentedCallStackAnalysis, LttngUstCallStackAnalysis, ProfilingCallGraphAnalysisModule

public interface IWeightedTreeProvider<@NonNull N,E,@NonNull T extends WeightedTree<@NonNull N>>
An interface that classes and analyses providing weighted trees can implement. This interface allows to add extra information about the specific trees that it provides. The trees are associated with elements that are used to group them. The elements can implement the ITree class if there is a hierarchy in the groupings.
Author:
Geneviève Bastien
  • Field Details

  • Method Details

    • getSelection

      default @Nullable IWeightedTreeSet<N,E,T> getSelection(ITmfTimestamp start, ITmfTimestamp end)
      Get a weighted tree set for a time selection. It should be a subset of the complete tree, ie the elements, and weights of the weighted trees should be included in full tree, but its range should cover only the requested time range. If this provider does not support selection range, null should be returned.
      Parameters:
      start - The timestamp of the start of the range
      end - The timestamp of the end of the range
      Returns:
      A weighted tree set that spans the selected range, or null if range is not supported.
    • getTreeSet

      IWeightedTreeSet<N,E,T> getTreeSet()
      Get the complete tree set provided by this object.
      Returns:
      The complete weighted tree set
    • getWeightType

      default IWeightedTreeProvider.MetricType getWeightType()
      Get the metric type for the weight value. The default metric is called "Weight" and is a number
      Returns:
      The metric type for the weight value.
    • getAdditionalMetrics

      default List<IWeightedTreeProvider.MetricType> getAdditionalMetrics()
      Get a list of additional metrics that are provided by this tree.
      Returns:
      A list of metrics provided by the trees, in addition to the weight
    • getAdditionalMetric

      default Object getAdditionalMetric(@NonNull T object, int metricIndex)
      Get an additional metric for a tree. The metric index corresponds to the position of the desired metric in the list of metric returned by the getAdditionalMetrics() method and the return value should be of the proper data type
      Parameters:
      object - The tree object for which to get the metric
      metricIndex - The index in the list of the metric metric to get
      Returns:
      The value of the metric for the tree in parameter
    • getStatistics

      default @Nullable IStatistics<?> getStatistics(@NonNull T object, int metricIndex)
      Get the statistics for a metric. The metric index corresponds to the position of the desired metric in the list of metric returned by the getAdditionalMetrics() method. If the index < 0, then the metric is the main weight.
      Parameters:
      object - The weighted tree object for which to get the metric
      metricIndex - The index in the list of the metric metric to get. If < 0, then the metric is the main weight
      Returns:
      The statistics for the metric of null if there are no statistics for this metric.
    • getExtraDataSets

      default List<String> getExtraDataSets()
      Return a list of additional data sets' titles. These sets will be available by calling WeightedTree.getExtraDataTrees(int) on the trees, where the index in the list is the parameter that the children set should match
      Returns:
      The title of each child set
    • toDisplayString

      default String toDisplayString(@NonNull T tree)
      Get a user-facing text to identify a tree object. By default, it is the string representation of the object.
      Parameters:
      tree - The tree whose value to display
      Returns:
      A user-facing string to identify this node
    • getTitle

      String getTitle()
      A title for this tree provider. This title will be visible by users and should describe what this tree provider's data represent.
      Returns:
      The title of this provider
    • getGroupDescriptor

      default @Nullable IWeightedTreeGroupDescriptor getGroupDescriptor()
      Get the group descriptors that describe the hierarchical groups of elements. This method returns null if the elements are not ITree instances. If the elements implement the ITree interface, the implementations may override this method and return a group descriptor that gives names to each level of the hierarchy of elements. Otherwise, it returns a group for the root element, whose next groups will match the depth of the ITree structure.
      Returns:
      The collection of group descriptors for this call graph, or null if there is no hierarchy of elements
    • getPalette

      default IDataPalette getPalette()
      Weighted tree providers can provide a palette of styles for the data represented. By default, it uses a default palette of a few qualitative colors that will use the hash code of objects to assign a style
      Returns:
      The palette for this data provider