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 data
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
27 * @author Mathieu Denis
29 public class TmfStatistics
{
32 * Total number of events.
36 protected long fNbEvents
= 0;
39 * Number of events within a time range (Partial event count).
43 protected long fNbEventsInTimeRange
= 0;
46 * @return the total events count
49 public long getTotal() {
54 * @return the partial events count within a time range
57 public long getPartial() {
58 return fNbEventsInTimeRange
;
62 * Increments by one the total number of events.
66 public void incrementTotal() {
71 * Increments <b>nb</b> times the total number of events.
74 * Amount that will be added to the total events count. Ignored
78 public void incrementTotal(int nb
) {
85 * Increments by one the number of events within a time range (partial events
90 public void incrementPartial() {
91 ++fNbEventsInTimeRange
;
95 * Increments <b>nb</b> times the number of events within a time range
96 * (partial events count).
99 * Amount that will be added to the partial events count. Ignored
103 public void incrementPartial(int nb
) {
105 fNbEventsInTimeRange
+= nb
;
110 * Resets the total number of events.
114 public void resetTotalCount() {
119 * Resets the number of events within a time range (partial events count).
123 public void resetPartialCount() {
124 fNbEventsInTimeRange
= 0;
This page took 0.033546 seconds and 5 git commands to generate.