Skip to content

Commit

Permalink
profiling: Change DP name of Flame Charts created by different analyses
Browse files Browse the repository at this point in the history
Prepend the analysis name before the view type, e.g. "Function Graph -
Flame Chart". This to be consistent with other data providers that
have common analysis (e.g. Function Graph - Latency Statistics)

This helps also with the default grouping by name of data providers in
the trace server front-end.

Note that at the same time the view name was change from "FlameChart" to
"Flame Chart". That change is also reflected in the data provider
description.

[Changed] DP name of Flame Chart created by different analyses

Signed-off-by: Bernd Hufmann <[email protected]>
  • Loading branch information
bhufmann committed Sep 30, 2024
1 parent 945b92e commit 128f2fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ public void testGetDescriptors() {

for (IDataProviderDescriptor descriptor : descriptors) {
if (descriptor.getId().equals("org.eclipse.tracecompass.analysis.profiling.core.flamechart:org.eclipse.tracecompass.analysis.profiling.core.tests.stub")) {
assertEquals("FlameChart Test Callstack (new)", descriptor.getName());
assertEquals("Test Callstack (new) - Flame Chart ", descriptor.getName());
assertEquals(IDataProviderDescriptor.ProviderType.TIME_GRAPH, descriptor.getType());
assertEquals("Show FlameChart provided by Analysis module: Test Callstack (new)", descriptor.getDescription());
assertEquals("Show Flame Chart provided by Analysis module: Test Callstack (new)", descriptor.getDescription());
} else {
fail("Unknown Entry" + descriptor.getId());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +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())
.setName(Objects.requireNonNull(Messages.FlameChartDataProvider_Title + " " + analysis.getName())) //$NON-NLS-1$
.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);
descriptors.add(builder.build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
FlameChartDataProvider_Symbol=Symbol
FlameChartDataProvider_ThreadId=TID
FlameChartDataProvider_KernelStatusTitle=Kernel statuses
FlameChartDataProvider_Title=FlameChart
FlameChartDataProvider_Description=Show FlameChart provided by {0}
FlameChartDataProvider_Title=Flame Chart
FlameChartDataProvider_Description=Show Flame Chart provided by {0}

0 comments on commit 128f2fa

Please sign in to comment.