*******************************************************************************/
package org.eclipse.linuxtools.lttng.ui.views.common;
-import org.eclipse.linuxtools.lttng.event.LttngTimestamp;
+import org.eclipse.linuxtools.lttng.core.event.LttngTimestamp;
import org.eclipse.linuxtools.lttng.ui.TraceDebug;
-import org.eclipse.linuxtools.tmf.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.TmfTimeScaleSelectionEvent;
/**
// time interval
private double pixelsPerNs = 0;
private int eventsDiscarded = 0;
+ private int eventsDiscardedOutOfView = 0;
+ private int eventsDiscardedNotVisible = 0;
private int eventsDiscardedWrongOrder = 0;
private TmfTimeRange trange = null;
+ public static final int OUT_OF_VIEWRANGE = 0;
+ public static final int NOT_VISIBLE = 1;
+
// ========================================================================
// Methods
// ========================================================================
* @param selTime
*/
public void setSelectedTime(long selTime) {
- TraceDebug.debug("Selected time changed from: \n\t" + selectedTime
- + " to: \n\t" + selTime);
+ TraceDebug.debug("Selected time changed from: \n\t" + selectedTime //$NON-NLS-1$
+ + " to: \n\t" + selTime); //$NON-NLS-1$
selectedTime = selTime;
}
// update succeeded
updated = true;
- TraceDebug.debug("Configuration updated to: StartTime: " /* */
+ TraceDebug.debug("Configuration updated to: StartTime: " /* */ //$NON-NLS-1$
+ fTimeStart /* */
- + "-" /* */
+ + "-" /* */ //$NON-NLS-1$
+ fTimeEnd /* */
- + " width: " /* */
- + width + " k: " + pixelsPerNs); /* */
+ + " width: " /* */ //$NON-NLS-1$
+ + width + " k: " + pixelsPerNs); /* */ //$NON-NLS-1$
} else {
TraceDebug
- .debug("End time is not greater than start time, start time: "
- + time0 + " end time: " + time1);
+ .debug("End time is not greater than start time, start time: " //$NON-NLS-1$
+ + time0 + " end time: " + time1); //$NON-NLS-1$
}
return updated;
public int getWidth() {
if (width == 0) {
TraceDebug
- .debug("Unexpected width value of 0 pixels, returning default");
+ .debug("Unexpected width value of 0 pixels, returning default"); //$NON-NLS-1$
return DEFAULT_WIDTH;
}
eventsDiscarded = value;
if (value == 0) {
eventsDiscardedWrongOrder = 0;
+ eventsDiscardedNotVisible = 0;
+ eventsDiscardedOutOfView = 0;
}
}
/**
*
*/
- public void incrementEventsDiscarded() {
+ public void incrementEventsDiscarded(int reason) {
+ if (reason == OUT_OF_VIEWRANGE) {
+ this.eventsDiscardedOutOfView++;
+ }
+
+ if (reason == NOT_VISIBLE) {
+ this.eventsDiscardedNotVisible++;
+ }
+
this.eventsDiscarded++;
}
}
+ /**
+ * @return
+ */
+ public int getEventsDiscardedNotVisible() {
+ return eventsDiscardedNotVisible;
+
+ }
+
+ /**
+ * @return
+ */
+ public int getEventsDiscardedOutOfViewRange() {
+ return eventsDiscardedOutOfView;
+
+ }
+
/**
* @return
*/