tmf: Fix IllegalStateException in HistogramDataModel
authorPatrick Tasse <patrick.tasse@gmail.com>
Tue, 19 May 2015 21:12:05 +0000 (17:12 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Wed, 20 May 2015 13:45:56 +0000 (09:45 -0400)
commitb6d74e0b404092cf2e9b4df78585f70fc8600124
treecd0407a253bf66f8403a9c3dd346c25ae70daa8a
parenta433ce7d0c6b9f6f3b73bfb33170f8c5e5309075
tmf: Fix IllegalStateException in HistogramDataModel

It should be allowed to have a last bucket set to 0 in the histogram
data model. This can happen if all trace events have the same timestamp.

The histogram time range is fixed to display even if the start and end
times are equal, as long as there is at least one event in the model.

The scaling is updated to make sure that these single-timestamp events
are spread over the whole width of the histogram. The scaled model will
have a bucket duration of 0 when it represents a single timestamp.

Change-Id: I5341aa6a158a3b4c1b3d4edee982ed67558e8a51
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/48224
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/histogram/HistogramDataModelTest.java
org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/histogram/Histogram.java
org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/histogram/HistogramDataModel.java
This page took 0.029862 seconds and 5 git commands to generate.