1 /*******************************************************************************
2 * Copyright (c) 2011, 2012 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Mathieu Denis <mathieu.denis@polymtl.ca> - Intial API and Implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.statistics
.model
;
16 * Primitive container for Statistics values.
18 * Contains information about statistics that can be retrieved with any type of
21 * There are two counters : one for the total number of events in the trace, and
22 * another for the number of events in the selected time range.
24 * @author Mathieu Denis
28 public class TmfStatisticsValues
{
31 * Total number of events.
33 protected long fNbEvents
= 0;
36 * Number of events within a time range (Partial event count).
38 protected long fNbEventsInTimeRange
= 0;
41 * @return the total events count
43 public long getTotal() {
48 * @return the partial events count within a time range
50 public long getPartial() {
51 return fNbEventsInTimeRange
;
55 * Increments by one the total number of events.
57 public void incrementTotal() {
62 * Increments <b>nb</b> times the total number of events.
65 * Amount that will be added to the total events count. Ignored
68 public void incrementTotal(int nb
) {
75 * Increments by one the number of events within a time range (partial events
78 public void incrementPartial() {
79 ++fNbEventsInTimeRange
;
83 * Increments <b>nb</b> times the number of events within a time range
84 * (partial events count).
87 * Amount that will be added to the partial events count. Ignored
90 public void incrementPartial(int nb
) {
92 fNbEventsInTimeRange
+= nb
;
97 * Resets the total number of events.
99 public void resetTotalCount() {
104 * Resets the number of events within a time range (partial events count).
106 public void resetPartialCount() {
107 fNbEventsInTimeRange
= 0;
This page took 0.032878 seconds and 6 git commands to generate.