1 /*******************************************************************************
2 * Copyright (c) 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 * Alexandre Montplaisir - Initial API
11 ******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.core
.statistics
;
17 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfTimestamp
;
18 import org
.eclipse
.linuxtools
.tmf
.core
.signal
.TmfStatsUpdatedSignal
;
21 * Provider for statistics, which is assigned to a trace. This can be used to
22 * populate views like the Statistics View or the Histogram.
24 * @author Alexandre Montplaisir
27 public interface ITmfStatistics
{
30 * This method provides a centralized and asynchronous way of querying
31 * statistics information. It is an alternative to the other get* methods,
32 * and should not block the caller for too long.
34 * Implementors can usually call their own getEventTotal(),
35 * getEventsInRange(), etc. but should do so in a separate thread, and
36 * should send a {@link TmfStatsUpdatedSignal} whenever they are done (that
37 * signal will carry the results).
40 * Is this for a global query (whole time range of a trace), or
41 * just for a specific time range.
43 * The start time of the query range. Has no effect if isGlobal
46 * The end time of the query range. Has no effect if isGlobal is
49 public void updateStats(final boolean isGlobal
, ITmfTimestamp start
,
53 * Return the total number of events in the trace.
55 * @return The total number of events
57 public long getEventsTotal();
60 * Return a Map of the total events in the trace, per event type. The event
61 * type should come from ITmfEvent.getType().getName().
63 * @return The map of <event_type, count>, for the whole trace
65 public Map
<String
, Long
> getEventTypesTotal();
68 * Retrieve the number of events in the trace in a given time interval.
71 * Start time of the time range
73 * End time of the time range
74 * @return The number of events found
76 public long getEventsInRange(ITmfTimestamp start
, ITmfTimestamp end
);
79 * Retrieve the number of events in the trace, per event type, in a given
83 * Start time of the time range
85 * End time of the time range
86 * @return The map of <event_type, count>, for the given time range
88 public Map
<String
, Long
> getEventTypesInRange(ITmfTimestamp start
,
This page took 0.03382 seconds and 6 git commands to generate.