Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 217773 Details for
Bug 371285
Session comparison between runs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Added data comparison viewer
0001-Added-perf-comparison-viewer.patch (text/plain), 5.21 KB, created by
Camilo Bernal
on 2012-06-22 18:36:49 EDT
(
hide
)
Description:
Added data comparison viewer
Filename:
MIME Type:
Creator:
Camilo Bernal
Created:
2012-06-22 18:36:49 EDT
Size:
5.21 KB
patch
obsolete
>From 84423d8bce46d7b87164f09b4df590a38c25ff8a Mon Sep 17 00:00:00 2001 >From: Camilo Bernal <cabernal@redhat.com> >Date: Fri, 22 Jun 2012 17:36:50 -0400 >Subject: [PATCH] Added perf comparison viewer. > >This viewer consists of 5 columns, each of which displays a particular >result about each PMSymbol matching pair. Cells are highlighted red >overhead gain and green for overhead loss. It uses a table sorter >(PerfDiffTableSorter.java) for columns sorting and a label provider >(PerfDiffLabelProvider.java). >--- > .../linuxtools/internal/perf/ui/PerfDiffView.java | 123 ++++++++++++++++++++ > 1 files changed, 123 insertions(+), 0 deletions(-) > create mode 100644 perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/ui/PerfDiffView.java > >diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/ui/PerfDiffView.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/ui/PerfDiffView.java >new file mode 100644 >index 0000000..8048ab4 >--- /dev/null >+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/ui/PerfDiffView.java >@@ -0,0 +1,123 @@ >+/******************************************************************************* >+ * Copyright (c) 2012 Red Hat, Inc. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Camilo Bernal <cabernal@redhat.com> - Initial Implementation. >+ *******************************************************************************/ >+package org.eclipse.linuxtools.internal.perf.ui; >+ >+import java.util.ArrayList; >+ >+import org.eclipse.jface.viewers.ArrayContentProvider; >+import org.eclipse.jface.viewers.TableViewer; >+import org.eclipse.jface.viewers.TableViewerColumn; >+import org.eclipse.linuxtools.internal.perf.model.PMSymbolMatch; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.events.SelectionAdapter; >+import org.eclipse.swt.events.SelectionEvent; >+import org.eclipse.swt.layout.GridData; >+import org.eclipse.swt.layout.GridLayout; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Table; >+import org.eclipse.swt.widgets.TableColumn; >+import org.eclipse.ui.part.ViewPart; >+ >+public class PerfDiffView extends ViewPart { >+ >+ private static final String ID = "org.eclipse.linuxtools.internal.perf.views.SessionDiffView"; >+ private TableViewer tableviewer; >+ private ArrayList<PMSymbolMatch> result = new ArrayList<PMSymbolMatch>(); >+ >+ @Override >+ public void createPartControl(Composite parent) { >+ >+ GridLayout layout = new GridLayout(1, false); >+ parent.setLayout(layout); >+ >+ tableviewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL >+ | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER); >+ >+ createColumns(parent, tableviewer); >+ >+ final Table table = tableviewer.getTable(); >+ table.setHeaderVisible(true); >+ table.setLinesVisible(true); >+ tableviewer.setContentProvider(new ArrayContentProvider()); >+ >+ // Layout for the table >+ GridData gridData = new GridData(); >+ gridData.verticalAlignment = GridData.FILL; >+ gridData.horizontalSpan = 2; >+ gridData.grabExcessHorizontalSpace = true; >+ gridData.grabExcessVerticalSpace = true; >+ gridData.horizontalAlignment = GridData.FILL; >+ >+ tableviewer.setContentProvider(new ArrayContentProvider()); >+ tableviewer.getControl().setLayoutData(gridData); >+ } >+ >+ private void createColumns(final Composite parent, final TableViewer viewer) { >+ String[] titles = { "Function", "New Overhead (%)", "Old Overhead (%)", >+ "Result", "Event", "" }; >+ int[] bounds = { 100, 133, 135, 100, 100, 1 }; >+ >+ final PerfDiffTableSorter tableSorter = new PerfDiffTableSorter(); >+ final Table table = tableviewer.getTable(); >+ >+ for (int i = 0; i < titles.length; i++) { >+ final int index = i; >+ createTableViewerColumn(titles[i], bounds[i], index, tableSorter, >+ table); >+ } >+ >+ tableviewer.setLabelProvider(new PerfDiffLabelProvider()); >+ tableviewer.setSorter(tableSorter); >+ } >+ >+ private TableViewerColumn createTableViewerColumn(String title, int bound, >+ final int colIndex, final PerfDiffTableSorter tableSorter, >+ final Table table) { >+ final TableViewerColumn viewerColumn = new TableViewerColumn( >+ tableviewer, SWT.NONE); >+ final TableColumn column = viewerColumn.getColumn(); >+ column.setText(title); >+ column.setWidth(bound); >+ column.setResizable(true); >+ column.setMoveable(true); >+ column.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ tableSorter.setColumnIndex(colIndex); >+ int dir = table.getSortDirection(); >+ >+ if (table.getSortColumn() == column) { >+ dir = (dir == SWT.UP) ? SWT.DOWN : SWT.UP; >+ } else { >+ dir = SWT.DOWN; >+ } >+ >+ table.setSortDirection(dir); >+ table.setSortColumn(column); >+ tableviewer.refresh(); >+ } >+ }); >+ return viewerColumn; >+ } >+ >+ @Override >+ public void setFocus() { >+ tableviewer.getControl().setFocus(); >+ } >+ >+ public void setResult(ArrayList<PMSymbolMatch> result) { >+ this.result = result; >+ } >+ >+ public void refreshView() { >+ tableviewer.setInput(result.toArray()); >+ tableviewer.refresh(); >+ } >+} >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
jjohnstn
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 371285
:
217768
|
217769
|
217770
|
217771
|
217772
| 217773 |
217774
|
217775
|
217776
|
217779
|
218026
|
218056