1 /*******************************************************************************
2 * Copyright (c) 2009, 2011 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 * William Bourque - Initial API and implementation
11 * Yuriy Vashchuk - Heritage correction.
12 * Francois Chouinard - Cleanup and refactoring
13 *******************************************************************************/
15 package org
.eclipse
.linuxtools
.lttng
.ui
.views
.histogram
;
17 import org
.eclipse
.linuxtools
.lttng
.LttngConstants
;
18 import org
.eclipse
.linuxtools
.lttng
.event
.LttngEvent
;
19 import org
.eclipse
.linuxtools
.tmf
.event
.TmfTimeRange
;
20 import org
.eclipse
.linuxtools
.tmf
.request
.ITmfDataRequest
;
21 import org
.eclipse
.linuxtools
.tmf
.request
.TmfEventRequest
;
24 * <b><u>HistogramRequest</u></b>
27 public class HistogramRequest
extends TmfEventRequest
<LttngEvent
> {
29 // ------------------------------------------------------------------------
31 // ------------------------------------------------------------------------
33 private final Histogram fHistogram
;
35 // ------------------------------------------------------------------------
37 // ------------------------------------------------------------------------
39 public HistogramRequest(Histogram histogram
, TmfTimeRange range
, int nbEvents
, ITmfDataRequest
.ExecutionType execType
) {
40 super(LttngEvent
.class, range
, nbEvents
, LttngConstants
.DEFAULT_BLOCK_SIZE
, execType
);
41 fHistogram
= histogram
;
44 public HistogramRequest(Histogram histogram
, TmfTimeRange range
, ITmfDataRequest
.ExecutionType execType
) {
45 this(histogram
, range
, ALL_DATA
, execType
);
48 // ------------------------------------------------------------------------
50 // ------------------------------------------------------------------------
53 public void handleData(LttngEvent event
) {
54 super.handleData(event
);
56 long timestamp
= event
.getTimestamp().getValue();
57 fHistogram
.countEvent(timestamp
);
62 public void handleCompleted() {
64 super.handleCompleted();
68 public void handleCancel() {
This page took 0.034239 seconds and 6 git commands to generate.