DESCRIPTION

[RFC] tmf: Remove the precision from ITmfTimestamp

Timestamp precision is a problem in tracers, not in a viewer.
We already have the notion of scale which kind-of does the same
thing (if a timestamp is specified up to milliseconds, we can
consider it precise up to milliseconds).

Not only this removes big chunks of unused code, it should speed
up timestamp comparisons non-negligibly.

Change-Id: I2d121a32df72dd383925d57795f68c4a07a75125
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Braxton Mccarthy
date: 2014-04-10 18:58:03.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-04-10 18:58:14.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6339/

-------------------------------------
author: Brenden Conley
date: 2014-04-10 19:03:28.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6339/ : FAILURE

-------------------------------------
author: Ivy Mitchell
date: 2014-04-10 20:08:53.000000000

Patch Set 1: Code-Review-1

(2 comments)

A couple of questions

Line:267, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestamp.java -> elvis notation here?

Line:322, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestamp.java -> this would make 1 ms and 1000000 ns not equal. Do we want that?

-------------------------------------
author: Ivy Mitchell
date: 2014-04-10 20:18:24.000000000

Patch Set 1:

This is the performance gain, 
http://imgur.com/4MkAf8C bear in mind that the x axis is number of traces, y is time to service.

-------------------------------------
author: Braxton Mccarthy
date: 2014-04-10 21:18:19.000000000

Patch Set 1:

(2 comments)

You should publish the script to generate those graphs ;)

Line:267, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestamp.java -> elvis can only replace a if/else, not if/elseif/else

I moved the check for == 0 to the end, because given the possible range of timestamps, I assume typically they will not be equal, so check the least possible outcome last.

Line:322, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestamp.java -> Perhaps? But doing a normalize() here throws an ArithmeticOperationException(?) in some tests. While keeping it this way passes all of them.

We could still keep compareTo(ts) == 0 though!

-------------------------------------
author: Ivy Mitchell
date: 2014-04-11 01:05:10.000000000

Patch Set 1:

(2 comments)

I would love to, just find a host for 200 lttng traces.

Line:267, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestamp.java -> return (delta >0? 1:(delta < 0? -1:0));

a double elvis... all the way man! all the way!

Line:322, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/timestamp/TmfTimestamp.java -> I think a helper function is in order here, a lighter compareto.

-------------------------------------
author: Brenden Conley
date: 2014-04-11 01:19:50.000000000

Patch Set 1: -Verified

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6351/

-------------------------------------
author: Brenden Conley
date: 2014-04-11 01:27:59.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6351/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2014-04-11 11:39:24.000000000

Patch Set 1: -Verified

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6359/

-------------------------------------
author: Brenden Conley
date: 2014-04-11 11:45:25.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6359/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2014-04-11 14:23:37.000000000

Patch Set 1: -Verified

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6364/

-------------------------------------
author: Brenden Conley
date: 2014-04-11 14:27:55.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/6364/ : FAILURE

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