01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.admin.common;
05:
06: import org.jfree.data.time.Second;
07:
08: import com.tc.admin.ConnectionContext;
09: import com.tc.stats.statistics.Statistic;
10: import com.tc.stats.statistics.TimeStatistic;
11:
12: import java.util.Date;
13:
14: public class TimeStatisticPanel extends StatisticPanel {
15: public TimeStatisticPanel(ConnectionContext cc) {
16: super (cc);
17: }
18:
19: public void setStatistic(Statistic stat) {
20: super .setStatistic(stat);
21:
22: TimeStatistic timeStat = (TimeStatistic) stat;
23: long ts = timeStat.getLastSampleTime();
24: long count = timeStat.getCount();
25:
26: getTimeSeries().addOrUpdate(new Second(new Date(ts)), count);
27: }
28: }
|