Skip to content

Commit

Permalink
timing: Use analysis id as parent ID for latency data providers
Browse files Browse the repository at this point in the history
This can be used for grouping on the front-end implementations.

Only apply that for configured latency analysis where ITmfConfiguration
is not null.

[Updated] Latency Analysis DataProviderDescriptors with parentId

Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
bhufmann committed Oct 24, 2024
1 parent cbb3866 commit 751b02c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public Collection<IDataProviderDescriptor> getDescriptors(ITmfTrace trace) {
if (!existingModules.contains(analysis.getId())) {
DataProviderDescriptor.Builder builder = new DataProviderDescriptor.Builder();
builder.setId(FlameChartDataProvider.ID + DataProviderConstants.ID_SEPARATOR + analysis.getId())
.setParentId(analysis.getConfiguration() != null ? analysis.getId() : null)
.setName(Objects.requireNonNull(analysis.getName() + " - " +Messages.FlameChartDataProvider_Title)) //$NON-NLS-1$
.setDescription(Objects.requireNonNull(NLS.bind(Messages.FlameChartDataProvider_Description, analysis.getHelpText())))
.setProviderType(ProviderType.TIME_GRAPH)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ protected void setStatisticsAnalysisModuleName(AbstractSegmentStatisticsAnalysis
protected @Nullable IDataProviderDescriptor getDataProviderDescriptor(IAnalysisModule analysis) {
DataProviderDescriptor.Builder builder = new DataProviderDescriptor.Builder();
builder.setId(SegmentStoreStatisticsDataProvider.ID + DataProviderConstants.ID_SEPARATOR + analysis.getId())
.setParentId(analysis.getConfiguration() != null ? analysis.getId() : null)
.setName(Objects.requireNonNull(NLS.bind(Messages.SegmentStoreStatisticsDataProvider_title, analysis.getName())))
.setDescription(Objects.requireNonNull(NLS.bind(Messages.SegmentStoreStatisticsDataProvider_description, analysis.getHelpText())))
.setProviderType(ProviderType.DATA_TREE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public Collection<IDataProviderDescriptor> getDescriptors(ITmfTrace trace) {
if (!existingModules.contains(analysis.getId())) {
DataProviderDescriptor.Builder builder = new DataProviderDescriptor.Builder();
builder.setId(SegmentStoreScatterDataProvider.ID + DataProviderConstants.ID_SEPARATOR + analysis.getId())
.setParentId(analysis.getConfiguration() != null ? analysis.getId() : null)
.setName(Objects.requireNonNull(NLS.bind(Messages.SegmentStoreScatterGraphDataProvider_title, analysis.getName())))
.setDescription(Objects.requireNonNull(NLS.bind(Messages.SegmentStoreScatterGraphDataProvider_description, analysis.getHelpText())))
.setProviderType(ProviderType.TREE_TIME_XY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public Collection<IDataProviderDescriptor> getDescriptors(ITmfTrace trace) {
if (!existingModules.contains(analysis.getId())) {
DataProviderDescriptor.Builder builder = new DataProviderDescriptor.Builder();
builder.setId(SegmentStoreTableDataProvider.ID + DataProviderConstants.ID_SEPARATOR + analysis.getId())
.setParentId(analysis.getConfiguration() != null ? analysis.getId() : null)
.setName(Objects.requireNonNull(NLS.bind(Messages.SegmentStoreTableDataProvider_title, analysis.getName())))
.setDescription(Objects.requireNonNull(NLS.bind(Messages.SegmentStoreTableDataProvider_description, analysis.getHelpText())))
.setProviderType(ProviderType.TABLE)
Expand Down

0 comments on commit 751b02c

Please sign in to comment.