tmf: Introduce the ITmfStatistics interface
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / statistics / ITmfStatistics.java
1 /*******************************************************************************
2 * Copyright (c) 2012 Ericsson
3 *
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
8 *
9 * Contributors:
10 * Alexandre Montplaisir - Initial API
11 ******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.core.statistics;
14
15 import java.util.Map;
16
17 import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
18
19 /**
20 * Provider for statistics, which is assigned to a trace. This can be used to
21 * populate views like the Statistics View or the Histogram.
22 *
23 * @author Alexandre Montplaisir
24 * @since 2.0
25 */
26 public interface ITmfStatistics {
27
28 /**
29 * Return the total number of events in the trace.
30 *
31 * @return The total number of events
32 */
33 public long getEventsTotal();
34
35 /**
36 * Return a Map of the total events in the trace, per event type. The event
37 * type should come from ITmfEvent.getType().getName().
38 *
39 * @return The map of <event_type, count>, for the whole trace
40 */
41 public Map<String, Long> getEventTypesTotal();
42
43 /**
44 * Retrieve the number of events in the trace in a given time interval.
45 *
46 * @param start
47 * Start time of the time range
48 * @param end
49 * End time of the time range
50 * @return The number of events found
51 */
52 public long getEventsInRange(ITmfTimestamp start, ITmfTimestamp end);
53
54 /**
55 * Retrieve the number of events in the trace, per event type, in a given
56 * time interval.
57 *
58 * @param start
59 * Start time of the time range
60 * @param end
61 * End time of the time range
62 * @return The map of <event_type, count>, for the given time range
63 */
64 public Map<String, Long> getEventTypesInRange(ITmfTimestamp start,
65 ITmfTimestamp end);
66 }
This page took 0.032569 seconds and 6 git commands to generate.