// // PROBE MANAGEMENT // private void add() { Collection<PerformanceProbe> probes = _perfProbes.get(outputPeriod); if (probes == null) { probes = new Vector<PerformanceProbe>(); _perfProbes.put(outputPeriod, probes); if (outputPeriod != NOT_PERIODIC) { TimerTask task = new OutputTask(outputPeriod); long next = nextOccurence(outputPeriod); probeTimer.scheduleAtFixedRate(task, next, outputPeriod); } } probes.add(this); }
// // Sampling management // private void add() { Collection<SamplingTask> samplers = samplingTasks.get(samplingPeriod); if (samplers == null) { samplers = new Vector<SamplingTask>(); samplingTasks.put(samplingPeriod, samplers); if (samplingPeriod != NOT_PERIODIC) { TimerTask task = new OutputTask(samplingPeriod); long next = nextOccurence(samplingPeriod); probeTimer.scheduleAtFixedRate(task, next, samplingPeriod); } } SamplingTask sampler = new SamplingTask(this); samplers.add(sampler); }