2010-10-26 Francois Chouinard <fchouinard@gmail.com> Contribution for Bug309042
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.ui / src / org / eclipse / linuxtools / lttng / ui / views / statistics / evProcessor / StatsModeChangeHandler.java
CommitLineData
6e512b93
ASL
1/*******************************************************************************
2 * Copyright (c) 2009 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 * Yann N. Dauphin (dhaemon@gmail.com) - Implementation for stats
11 *******************************************************************************/
9dbeec54 12
6e512b93
ASL
13package org.eclipse.linuxtools.lttng.ui.views.statistics.evProcessor;
14
15import org.eclipse.linuxtools.lttng.event.LttngEvent;
16import org.eclipse.linuxtools.lttng.state.StateStrings.Events;
17import org.eclipse.linuxtools.lttng.state.model.LttngTraceState;
9dbeec54 18import org.eclipse.linuxtools.lttng.ui.views.statistics.model.StatisticsData;
6e512b93
ASL
19
20class StatsModeChangeHandler extends AbstractStatsEventHandler {
21
22 public StatsModeChangeHandler(Events eventType) {
23 super(eventType);
24 }
25
26 /* (non-Javadoc)
27 * @see org.eclipse.linuxtools.lttng.state.evProcessor.IEventProcessing#process(org.eclipse.linuxtools.lttng.event.LttngEvent, org.eclipse.linuxtools.lttng.state.model.LttngTraceState)
28 */
d4011df2 29 @Override
9dbeec54
FC
30 public boolean process(LttngEvent event, LttngTraceState traceState) {
31 StatisticsData tree = getStatisticsTree(traceState);
32 tree.increase(event, traceState, StatisticsData.Values.CPU_TIME | StatisticsData.Values.STATE_CUMULATIVE_CPU_TIME);
6e512b93
ASL
33 return false;
34 }
35
36}
This page took 0.027782 seconds and 5 git commands to generate.