To avoid a clash with the new tmf.core.statistics.TmfStatistics.
Change-Id: Iae1b5cea64c6a441e4dc3ea63c860537a69b24ac
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/8005
Reviewed-by: Bernd Hufmann <bhufmann@gmail.com>
IP-Clean: Bernd Hufmann <bhufmann@gmail.com>
Tested-by: Bernd Hufmann <bhufmann@gmail.com>
Tested-by: Hudson CI
package org.eclipse.linuxtools.tmf.ui.tests.statistics;
-import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfStatistics;
+import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfStatisticsValues;
import junit.framework.TestCase;
// Fields
// ------------------------------------------------------------------------
- TmfStatistics stats = new TmfStatistics();
+ TmfStatisticsValues stats = new TmfStatisticsValues();
// ------------------------------------------------------------------------
// Checks initial state
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Mathieu Denis <mathieu.denis@polymtl.ca> - Intial API and Implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.ui.viewers.statistics.model;
-
-/**
- * Primitive container for Statistics data
- *
- * Contains information about statistics that can be retrieved with any type of
- * traces
- *
- * There are two counters : one for the total number of events in the trace and
- * another for the number of events in the selected time range
- *
- * @version 2.0
- * @version 2.0
- * @since 2.0
- * @author Mathieu Denis
- */
-public class TmfStatistics {
-
- /**
- * Total number of events.
- *
- * @since 2.0
- */
- protected long fNbEvents = 0;
-
- /**
- * Number of events within a time range (Partial event count).
- *
- * @since 2.0
- */
- protected long fNbEventsInTimeRange = 0;
-
- /**
- * @return the total events count
- * @since 2.0
- */
- public long getTotal() {
- return fNbEvents;
- }
-
- /**
- * @return the partial events count within a time range
- * @since 2.0
- */
- public long getPartial() {
- return fNbEventsInTimeRange;
- }
-
- /**
- * Increments by one the total number of events.
- *
- * @since 2.0
- */
- public void incrementTotal() {
- ++fNbEvents;
- }
-
- /**
- * Increments <b>nb</b> times the total number of events.
- *
- * @param nb
- * Amount that will be added to the total events count. Ignored
- * if negative.
- * @since 2.0
- */
- public void incrementTotal(int nb) {
- if (nb > 0) {
- fNbEvents += nb;
- }
- }
-
- /**
- * Increments by one the number of events within a time range (partial events
- * count).
- *
- * @since 2.0
- */
- public void incrementPartial() {
- ++fNbEventsInTimeRange;
- }
-
- /**
- * Increments <b>nb</b> times the number of events within a time range
- * (partial events count).
- *
- * @param nb
- * Amount that will be added to the partial events count. Ignored
- * if negative.
- * @since 2.0
- */
- public void incrementPartial(int nb) {
- if (nb > 0) {
- fNbEventsInTimeRange += nb;
- }
- }
-
- /**
- * Resets the total number of events.
- *
- * @since 2.0
- */
- public void resetTotalCount() {
- fNbEvents = 0;
- }
-
- /**
- * Resets the number of events within a time range (partial events count).
- *
- * @since 2.0
- */
- public void resetPartialCount() {
- fNbEventsInTimeRange = 0;
- }
-}
/**
* Value of the node.
*/
- protected TmfStatistics fValue;
+ protected TmfStatisticsValues fValue;
/**
* Path of the node.
AbsTmfStatisticsTree nodes) {
fPath = path;
fNodes = nodes;
- fValue = new TmfStatistics();
+ fValue = new TmfStatisticsValues();
}
/**
*
* @return Value associated with this node.
*/
- public TmfStatistics getValue() {
+ public TmfStatisticsValues getValue() {
return fValue;
}
* no children.
*/
public void reset() {
- fValue = new TmfStatistics();
+ fValue = new TmfStatisticsValues();
fNodes.reset(fPath);
}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mathieu Denis <mathieu.denis@polymtl.ca> - Intial API and Implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.ui.viewers.statistics.model;
+
+/**
+ * Primitive container for Statistics values.
+ *
+ * Contains information about statistics that can be retrieved with any type of
+ * traces.
+ *
+ * There are two counters : one for the total number of events in the trace, and
+ * another for the number of events in the selected time range.
+ *
+ * @author Mathieu Denis
+ * @version 2.0
+ * @since 2.0
+ */
+public class TmfStatisticsValues {
+
+ /**
+ * Total number of events.
+ */
+ protected long fNbEvents = 0;
+
+ /**
+ * Number of events within a time range (Partial event count).
+ */
+ protected long fNbEventsInTimeRange = 0;
+
+ /**
+ * @return the total events count
+ */
+ public long getTotal() {
+ return fNbEvents;
+ }
+
+ /**
+ * @return the partial events count within a time range
+ */
+ public long getPartial() {
+ return fNbEventsInTimeRange;
+ }
+
+ /**
+ * Increments by one the total number of events.
+ */
+ public void incrementTotal() {
+ ++fNbEvents;
+ }
+
+ /**
+ * Increments <b>nb</b> times the total number of events.
+ *
+ * @param nb
+ * Amount that will be added to the total events count. Ignored
+ * if negative.
+ */
+ public void incrementTotal(int nb) {
+ if (nb > 0) {
+ fNbEvents += nb;
+ }
+ }
+
+ /**
+ * Increments by one the number of events within a time range (partial events
+ * count).
+ */
+ public void incrementPartial() {
+ ++fNbEventsInTimeRange;
+ }
+
+ /**
+ * Increments <b>nb</b> times the number of events within a time range
+ * (partial events count).
+ *
+ * @param nb
+ * Amount that will be added to the partial events count. Ignored
+ * if negative.
+ */
+ public void incrementPartial(int nb) {
+ if (nb > 0) {
+ fNbEventsInTimeRange += nb;
+ }
+ }
+
+ /**
+ * Resets the total number of events.
+ */
+ public void resetTotalCount() {
+ fNbEvents = 0;
+ }
+
+ /**
+ * Resets the number of events within a time range (partial events count).
+ */
+ public void resetPartialCount() {
+ fNbEventsInTimeRange = 0;
+ }
+}