Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux.core: Add Priority Statistics view for SWSLatency analysis
This commit adds view and viewer classes for the Priority Statistics view. It also adds the view to SWS Latency analysis. The view groups entries in the SWS Latency analysis based on priority of the segments. [Added] Priority Statistics view for SWSLatency analysis Change-Id: If21c1fc53259fbef234d9155aabb5420d4bfbf98 Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca> Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/204775 Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org> Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com> Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
- Loading branch information
1 parent
1bbe313
commit 88f184d
Showing
5 changed files
with
114 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...pse/tracecompass/analysis/os/linux/ui/segmentstore/statistics/PriorityStatisticsView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/********************************************************************** | ||
* Copyright (c) 2023 Ericsson | ||
* | ||
* All rights reserved. This program and the accompanying materials are | ||
* made available under the terms of the Eclipse Public License 2.0 which | ||
* accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
**********************************************************************/ | ||
|
||
package org.eclipse.tracecompass.analysis.os.linux.ui.segmentstore.statistics; | ||
|
||
import org.eclipse.jdt.annotation.NonNull; | ||
import org.eclipse.jdt.annotation.Nullable; | ||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.statistics.AbstractSegmentsStatisticsView; | ||
import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.statistics.AbstractSegmentsStatisticsViewer; | ||
import org.eclipse.tracecompass.common.core.NonNullUtils; | ||
import org.eclipse.ui.PlatformUI; | ||
import org.eclipse.ui.views.IViewDescriptor; | ||
|
||
/** | ||
* A segment store statistics view for showing statistics based on the priority of segments | ||
* The analysis specified by the secondaryId must create segments that implement IPrioritySegment. | ||
* | ||
* @author Hoang Thuan Pham | ||
*/ | ||
public class PriorityStatisticsView extends AbstractSegmentsStatisticsView { | ||
/** | ||
* ID of this view | ||
*/ | ||
public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.ui.segmentstore.statistics.priority"; //$NON-NLS-1$ | ||
|
||
@Override | ||
public void createPartControl(@Nullable Composite parent) { | ||
super.createPartControl(parent); | ||
// Set the title of the view from the actual view ID | ||
IViewDescriptor desc = PlatformUI.getWorkbench().getViewRegistry().find(getViewId()); | ||
if (desc != null) { | ||
setPartName(desc.getLabel()); | ||
} | ||
} | ||
|
||
@Override | ||
protected @NonNull AbstractSegmentsStatisticsViewer createSegmentStoreStatisticsViewer(@NonNull Composite parent) { | ||
// The analysis ID is the secondary ID of the view | ||
String analysisId = NonNullUtils.nullToEmptyString(getViewSite().getSecondaryId()); | ||
return new PriorityStatisticsViewer(parent, analysisId); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...e/tracecompass/analysis/os/linux/ui/segmentstore/statistics/PriorityStatisticsViewer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/********************************************************************** | ||
* Copyright (c) 2023 Ericsson | ||
* | ||
* All rights reserved. This program and the accompanying materials are | ||
* made available under the terms of the Eclipse Public License 2.0 which | ||
* accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
**********************************************************************/ | ||
|
||
package org.eclipse.tracecompass.analysis.os.linux.ui.segmentstore.statistics; | ||
|
||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.statistics.AbstractSegmentsStatisticsViewer; | ||
import org.eclipse.tracecompass.internal.analysis.os.linux.core.segmentstore.PriorityStatisticsDataProviderFactory; | ||
|
||
/** | ||
* A segment store statistics viewer for showing statistics based on the priority | ||
* of segments. | ||
* | ||
* @author Hoang Thuan Pham | ||
*/ | ||
public class PriorityStatisticsViewer extends AbstractSegmentsStatisticsViewer { | ||
/** | ||
* Constructor | ||
* | ||
* @param parent | ||
* The parent composite | ||
* @param analysisId | ||
* The ID of the segment store provider to do statistics on | ||
*/ | ||
public PriorityStatisticsViewer(Composite parent, String analysisId) { | ||
super(parent, PriorityStatisticsDataProviderFactory.DATA_PROVIDER_ID + ':' + analysisId); | ||
} | ||
} |