Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311930

Summary: [LTTng] HistogramView : Make sure time interval are small enought in very long trace
Product: z_Archived Reporter: William Bourque <william.bourque>
Component: LinuxToolsAssignee: Francois Chouinard <fchouinard>
Status: CLOSED FIXED QA Contact: Francois Chouinard <fchouinard>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
The multi-trace bug correction and histogram view improvements
fchouinard: iplog+
Patch corrections fchouinard: iplog+

Description William Bourque CLA 2010-05-06 12:52:14 EDT
In the histogram view, the experiment is read complettly and stored in an array of content.

The length of the array is determined dynamically and is a function of the screen display; the number of space in the array should be the next power of 2 to the screen width. 
From this, the time interval of each space is "EndTime - StartTime" / NbSpace.

However, this would cause problem on very long trace as the interval will be very large. 
As example :
Trace Duration == 3600 seconds 
Screen Resolution == 1600x1200 -> Array length == 2048
Time interval = ( 3600 / 2048 ) = 1.757sec --> VERY LARGE.

To make sure the interval does not get too large, we should implement an algorithm that would "increase" the number of space in the Array to th next power of two if the Interval is, let's say, bigger than 0.5 seconds.
Comment 1 Yuriy Vashchuk CLA 2010-07-29 16:08:20 EDT
Created attachment 175526 [details]
The multi-trace bug correction and histogram view improvements

The Selection Window class has been recreated.
The Histogram Heritage Model has been corrected and simplified (the variables/functions access rights, heritage, creating supplementary classes in order to separate the small and big histograms).
1 sec default time range has been modified. If the experiment duration is smaller than selection time range we will use 1/2 of experiment duration as time range.
At start, the selection window left border has been aligned to the left border of experiment.
The selection window coordinates calculation has been improved and now the window can't out from full experiment time range.
The min time range bug has been corrected (when we reach the min time we can't zoom out).

The mouse listener integration has been improved.
Zoom In/Out has been improved. The delay has been increased, the range verification has been implemented some performance improvements have been made. The drawing of selection zone is visible through zoom process. Full experiment size is the max size for window after zoom out.
Comment 2 Francois Chouinard CLA 2010-07-30 10:57:44 EDT
Patch committed. Thanks Yuryi.
Comment 3 Yuriy Vashchuk CLA 2010-09-10 18:17:48 EDT
Created attachment 178666 [details]
Patch corrections

New Abstract Class has been added. It helps to separate Parent and Child Histogram Paint Listeners.

The condition to determine the canvas changes (new window selection/moving, new experiment selection) has been corrected.
Comment 4 Francois Chouinard CLA 2010-10-27 12:43:29 EDT
Comment on attachment 178666 [details]
Patch corrections

Committed on Indigo
Comment 5 Francois Chouinard CLA 2011-07-22 14:33:40 EDT
Delivered with 0.7