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 * Set either the "global" or the "time range" value.
58 * True to set the global value, false for the timerange one.
60 * The new value to set
62 public void setValue(boolean global
, long nb
) {
67 fNbEventsInTimeRange
= nb
;
73 * Resets the total number of events.
75 public void resetTotalCount() {
80 * Resets the number of events within a time range (partial events count).
82 public void resetPartialCount() {
83 fNbEventsInTimeRange
= 0;
87 public String
toString() {
88 return fNbEvents
+ ", " + fNbEventsInTimeRange
; //$NON-NLS-1$
This page took 0.034072 seconds and 6 git commands to generate.