DESCRIPTION

[Proposal] fix #404038: Add a plotting engine on top of traces


COMMENTS

author: Brenden Conley
date: 2013-06-13 13:10:57.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/2710/ 

-------------------------------------
author: Brenden Conley
date: 2013-06-13 13:28:07.000000000

Patch Set 1: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/2710/ : SUCCESS

-------------------------------------
author: Ricky Reeves
date: 2013-08-02 17:43:27.000000000

Patch Set 1: Code-Review-1

(72 comments)

- User Guide
All user guide items of LTTng/TMF are in the lttng.help plugin. Please add a user guide for the graph plotting feature there. For that, update the media wiki file in lttng.help/doc/User-Guide.mediawiki

- Test cases
Currently there are no JUnit test cases available. There should be some at least for the core elements 
(Expressions, Language, extract request etc). 

- In the other Eclipse plug-ins we have eclipse preferences stored in the project, where we define save actions 
(e.g. delete trailing spaces), compiler warning settings and so on. Please add them to the graph project, too 
so that we have the same settings. (for example files in directory  tmf.core/.settings/). Do that first before
updating the files for the comments, then you get the removal of trailing spaces of java files for free.

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/SeriesLabelPage.java -> Copyright header

Line:29, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/SeriesLabelPage.java -> This class has some NLS warnings. Please externalize all relevant strings (e.g. for Chart) and add //$NON-NLS-1$ for the others.

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AxisTickPage.java -> Copyright header is missing

Line:32, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AxisTickPage.java -> fix NLS warning

Line:35, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AxisTickPage.java -> Fix NLS warning

Line:145, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AxisTickPage.java -> Externalize this string

Line:155, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AxisTickPage.java -> Externalize this string

Line:164, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AxisTickPage.java -> Externalize this string

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Copyright header missing

Line:29, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Fix NLS warning

Line:32, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Fix NLS warning

Line:35, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Fix NLS warning

Line:38, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Fix NLS warning

Line:72, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Remove all trailing spaces

Line:112, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Externalize this string

Line:115, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Externalize this string

Line:118, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Externalize this string

Line:128, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Externalize this string

Line:130, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Externalize this string

Line:138, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Externalize this string

Line:141, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Externalize this string

Line:144, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/ChartPage.java -> Externalize this string

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AbstractPage.java -> Copyright header is missing

Line:29, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AbstractPage.java -> Remove all trailing spaces in file.

Line:45, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AbstractPage.java -> comment not needed

Line:29, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/ExtractDataRequest.java -> Some of the member variables start with f to indicate that they are member variables. index and previousEvent don't follow this pattern. Please refactort them

Line:54, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/ExtractDataRequest.java -> The JVM will run out of memory for long traces because the the arrays will grow. I don't have quick solution for that, but this should be addressed. For given screen resolution it will be not useful to display millions of data points.

Line:55, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/ExtractDataRequest.java -> variable name should not start with _. Please rename
(

Line:85, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/ExtractDataRequest.java -> Add also java doc here

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/README -> I guess that's why in many files the EPL header was missing? Is this readme enough? I think we still have to have the copyright header in all the files that were taken from SWTchart. I don't know who put in the first line (Copyright). I think we need to figure that out before commiting it.

Line:32, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/ExtractDataJob.java -> You could call it fTrace instead of fExperiment

Line:91, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/ExtractDataJob.java -> We removed all non-Javadoc comments from all the classes in TMF/LTTng, because they are not necessary (anymore).

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/SeriesPage.java -> Copyright

Line:33, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/SeriesPage.java -> This class has some NLS warnings. Please externalize all relevant strings (e.g. for Chart) and add //$NON-NLS-1$ for the others.

Line:133, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/SeriesPage.java -> trailing spaces in file

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/GridPage.java -> copyright header missing

Line:26, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/GridPage.java -> Fix NLS warning

Line:119, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/GridPage.java -> Externalize this string

Line:140, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/GridPage.java -> Externalize this string

Line:30, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/view/View.java -> Please rename the class to a more meaningful name other than View (e.g. PlottingView or ChartPlottingView)

Line:32, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/view/View.java -> Shouldn't this class class extend TmfView to be able to handle TMF signals from other components, e.g. for clearing data when a trace is closed?

Line:62, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/view/View.java -> variables starting with _ will cause sonar warnings. Please refactor all of them.

Line:80, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/view/View.java -> variables starting with _ will cause sonar warnings. Please refactor all of them.

Line:85, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/view/View.java -> If the xSeriesData or ySerisData are values for timestamps it would be good to display them in human readable format. There is a trick to use the TmfTimestampFormat together with SWTChart.

chart.getAxisSet().getXAxis(0).getTick().setFormat(new TmfChartTimeStampFormat());

...

public class TmfChartTimeStampFormat extends SimpleDateFormat {
        private static final long serialVersionUID = 1L;
       xxx@xxx.xxx
        public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
            long time = date.getTime();
            toAppendTo.append(TmfTimestampFormat.getDefaulTimeFormat().format(time));
            return toAppendTo;
        }
    }

Line:32, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AbstractSelectorPage.java -> trailing spaces

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/PropertiesResources.java -> Add copyright header

Line:2, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/language/PlottingGrammar.jj -> Is it possible line breaks, \r and special characters in this file which show up read here in the web browser for Gerrit.

Line:12, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/language/PlottingGrammar.jj -> Can you have readme or a comment here how to generated the code?

Line:3, lttng/org.eclipse.linuxtools.tmf.ui.graph/.project -> Replace all tabs in this file with spaces

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/LegendPage.java -> Add copyright header

Line:15, lttng/org.eclipse.linuxtools.tmf.ui.graph/plugin.properties -> change to extension to Extension

Line:7, /COMMIT_MSG -> Please add change-ID and signed-off by entries

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/SelectionRectangle.java -> Copyright header

Line:26, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/expression/PlottingTimestampExpression.java -> Use ITmfTimestamp.NANOSECOND_SCALE instead of -9

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AxisPage.java -> Missing copyright header

Line:40, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AxisPage.java -> Fix NLS warning

Line:43, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AxisPage.java -> Fix NLS warning

Line:116, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/AxisPage.java -> trailing spaces

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/InteractiveChart.java -> Add copyright header

Line:33, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/InteractiveChart.java -> Fix NLS warnings

Line:46, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/InteractiveChart.java -> Fix all trailing spaces

Line:200, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/InteractiveChart.java -> It would be good to display a tooltip with the current x-y-position. Otherwise it's very hard to know the x- and y value from just looking at the graph. As mentioned at another place, if a axis displays the time then it needs to be displayed in human readable form using the TmfTimestampFormat.

Line:411, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/InteractiveChart.java -> Fix NLS warnings

Line:413, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/InteractiveChart.java -> NLS warning

Line:427, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/InteractiveChart.java -> This method has a lot fo NLS warnings. Please externalize all relevant strings (e.g. for Chart) and add //$NON-NLS-1$ for the others.

Line:28, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/expression/PlottingPreviousTimestampExpression.java -> Use ITmfTimestamp.NANOSECOND_SCALE instead of -9

Line:29, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/expression/PlottingPreviousTimestampExpression.java -> BTW, casting long to double there is a loss of precision for long values using more than 53 bits. Especially for timestamps in UTC (as used in LTTng CTF traces)

Line:11, lttng/org.eclipse.linuxtools.tmf.ui.graph/plugin.xml -> move the name definition into plugin.properties and reference it here

Line:24, lttng/org.eclipse.linuxtools.tmf.ui.graph/pom.xml -> Add "Graph Extension" to the name

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/build.properties -> Please add a copyright header (see tmf.core for example to copy)

Line:10, lttng/org.eclipse.linuxtools.tmf.ui.graph/about.html -> Remove all trailing spaces in this file. 
(I know it's a copy from other plug-ins, but it's good to start clean in a new plug-in)

Line:1, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/Messages.java -> Add copyright header

-------------------------------------
author: Ivy Mitchell
date: 2013-08-06 21:39:05.000000000

Patch Set 1: Verified-1

Tested the functionality. 

Here's some feedback: 
The good: 
* zoom is great
* it is quite speedy

The to be improved: 
* It seems to require an awful lot of ram when I load a 1gb trace. 
* It took me about 10 min to remember how to use the plotting engine. 
* The wizard needs some more work, it is not super obvious. 
* Why is the "Values on Y axis" multi-line but it doesn't have a scroll bar. Also, what does multi-line mean here?

The thing that scares me: 
Lack of epl headers. I think that EPL requires headers. I may be wrong, IANAL https://bugs.eclipse.org/bugs/show_bug.cgi?id=226690

-------------------------------------
author: Ivy Mitchell
date: 2013-08-06 21:45:38.000000000

Patch Set 1:

(1 comment)

Line:37, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/language/PlottingGrammar.jj -> please use Bigint, as we may have longs that are BIG.

-------------------------------------
author: Luciana Barry
date: 2013-08-07 16:51:03.000000000

Patch Set 1:

Some comments:
- "Adjust" Axis would be clearer as "Fit" or "Reset".
- The zoom and axis actions could be added as buttons to the view toolbar.
- Zooming out should be limited to the range of the "Adjust".
- Would it be possible to use TmfTimestamp formatting for the axis tick labels while still keeping the relative positions?
- For an event field expression, it should be possible to somehow extract the numerical value from the field's text (e.g "value=1"), perhaps using regular expressions.
- Would we want to support multiple y-axis series? Otherwise, we could remove the option to show the legend.
- It would be nice to have synchronization with other views, however having event timestamp as an axis is not guaranteed...
- How can we make the chart scalable with very large traces? Now that the event table supports range selection, perhaps the graph could be limited to the user selected range, up to a maximum of matching data points.
- If the view is not synchronized to the active trace like other framework views, then perhaps there can be multiple instances of the view (you create a graph, it opens it in a new view instead of replacing the current view).

Anyways, there are a lot of improvements and features we can add later to this graph, perhaps as patch improvements after we merge a 'good enough' initial version.

The only points above I see as really critical is the extraction of numerical values from event field text, and scalability.

-------------------------------------
author: Luciana Barry
date: 2013-08-08 17:34:50.000000000

Patch Set 1:

(7 comments)

Line:27, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/expression/PlottingDivExpression.java -> We might want to add protection for division by zero here

Line:52, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/ExtractDataJob.java -> shouldn't it be 100 work units?

Line:67, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/ExtractDataJob.java -> possible ArithmeticException if trace has no events

Line:13, lttng/org.eclipse.linuxtools.tmf.ui.graph/plugin.properties -> ui.graph

Line:15, lttng/org.eclipse.linuxtools.tmf.ui.graph/plugin.properties -> Is it really an extension, since tmf.ui can't build without it? I would prefer "... TMF UI Graph Plug-in"

Line:410, lttng/org.eclipse.linuxtools.tmf.ui.graph/src/org/eclipse/linuxtools/internal/tmf/ui/graph/chart/InteractiveChart.java -> should use dialog.getFilterIndex to figure out which 'save as' type was selected by the user

Line:24, lttng/org.eclipse.linuxtools.tmf.ui.graph/pom.xml -> Or whatever we choose there, but it should match exactly with the name in plugin.properties

-------------------------------------
author: Braxton Mccarthy
date: 2014-01-17 23:03:22.000000000

Abandoned

Cleaning up old stuff.

This particular functionality is currently being implemented using SWTChart.

-------------------------------------
