1 4 package com.tc.admin.common; 5 6 import org.jfree.data.time.Second; 7 8 import com.tc.admin.ConnectionContext; 9 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 } 29 | Popular Tags |