private void gatherAndSendInteractionCounter(long now) { InteractionCounterBasket basket = new InteractionCounterBasket(); for (int i = 0; i < interactionCountStatList.size(); i++) { CountStat stat = interactionCountStatList.get(i); try { if (stat.counter.interval() <= now - stat.xtime) { stat.xtime = now; stat.counter.process(basket); } } catch (Throwable t) { t.printStackTrace(); } } InteractionPerfCounterPack[] packs = basket.geAllAsArray(); if (packs != null && packs.length > 0) { DataProxy.sendCounter(packs); } }
private void gatherAndSendCounter(long now) { CounterBasket basket = new CounterBasket(); for (int i = 0; i < countStatList.size(); i++) { CountStat stat = countStatList.get(i); try { if (stat.counter.interval() <= now - stat.xtime) { stat.xtime = now; stat.counter.process(basket); } } catch (Throwable t) { t.printStackTrace(); } } PerfCounterPack[] packs = basket.getList(); DataProxy.sendCounter(packs); }
private void gatherAndSendCounter(long now) { CounterBasket basket = new CounterBasket(); for (int i = 0; i < countStatList.size(); i++) { CountStat stat = countStatList.get(i); try { if (stat.counter.interval() <= now - stat.xtime) { stat.xtime = now; stat.counter.process(basket); } } catch (Throwable t) { t.printStackTrace(); } } PerfCounterPack[] packs = basket.getList(); DataProxy.sendCounter(packs); }
private void gatherAndSendInteractionCounter(long now) { InteractionCounterBasket basket = new InteractionCounterBasket(); for (int i = 0; i < interactionCountStatList.size(); i++) { CountStat stat = interactionCountStatList.get(i); try { if (stat.counter.interval() <= now - stat.xtime) { stat.xtime = now; stat.counter.process(basket); } } catch (Throwable t) { t.printStackTrace(); } } InteractionPerfCounterPack[] packs = basket.geAllAsArray(); if (packs != null && packs.length > 0) { DataProxy.sendCounter(packs); } }
public void run() { while (true) { ThreadUtil.sleep(1000); if (conf.counter_enabled == false) { continue; } long now = System.currentTimeMillis(); CounterBasket pw = new CounterBasket(); for (int i = 0; i < taskSec.size(); i++) { CountStat r = taskSec.get(i); try { if (r.counter.interval() <= now - r.xtime) { r.xtime = now; r.counter.process(pw); } } catch (Throwable t) { t.printStackTrace(); } } // PerfCounterPack[] pks = pw.getList(); DataProxy.sendCounter(pks); } } private CounterExecutingManager() {
fiveminPcp.put(CounterConstants.JAVA_PERM_USED, new DecimalValue(5)); fiveminPcp.put(CounterConstants.JAVA_PROCESS_CPU, new DecimalValue(5)); DataProxy.sendCounter(new PerfCounterPack[]{pcp, fiveminPcp});
fiveminPcp.put(CounterConstants.JAVA_PERM_USED, new DecimalValue(5)); fiveminPcp.put(CounterConstants.JAVA_PROCESS_CPU, new DecimalValue(5)); DataProxy.sendCounter(new PerfCounterPack[]{pcp, fiveminPcp});
private void gatherAndSendCounter(long now) { CounterBasket basket = new CounterBasket(); for (int i = 0; i < countStatList.size(); i++) { CountStat stat = countStatList.get(i); try { if (stat.counter.interval() <= now - stat.xtime) { stat.xtime = now; stat.counter.process(basket); } } catch (Throwable t) { t.printStackTrace(); } } PerfCounterPack[] packs = basket.getList(); DataProxy.sendCounter(packs); }
private void gatherAndSendInteractionCounter(long now) { InteractionCounterBasket basket = new InteractionCounterBasket(); for (int i = 0; i < interactionCountStatList.size(); i++) { CountStat stat = interactionCountStatList.get(i); try { if (stat.counter.interval() <= now - stat.xtime) { stat.xtime = now; stat.counter.process(basket); } } catch (Throwable t) { t.printStackTrace(); } } InteractionPerfCounterPack[] packs = basket.geAllAsArray(); if (packs != null && packs.length > 0) { DataProxy.sendCounter(packs); } }
fiveminPcp.put(CounterConstants.JAVA_PERM_USED, new DecimalValue(5)); fiveminPcp.put(CounterConstants.JAVA_PROCESS_CPU, new DecimalValue(5)); DataProxy.sendCounter(new PerfCounterPack[]{pcp, fiveminPcp});