@Test public void testRun() { System.out.println("run"); MonitoringResultsCollector instance = new MonitoringResultsCollector(); Thread t = new Thread(instance); t.start(); assertTrue(t.isAlive()); instance.testEnded(); }
@Override public synchronized void run() { try { syncContext(true); while (!stop) { long startTime = System.currentTimeMillis(); processConnectors(); long elapsedTime = System.currentTimeMillis() - startTime; if (interval > elapsedTime) { this.wait(interval - elapsedTime); } syncContext(false); } } catch (InterruptedException ex) { log.debug("Monitoring thread was interrupted", ex); } log.debug("exiting run()"); }
MonitoringResultsCollector extends CorrectedResultCollector implements Runnable, MonitoringSampleGenerator { @Override public synchronized void run() { try { syncContext(true); while (!stop) { long startTime = System.currentTimeMillis(); processConnectors(); long elapsedTime = System.currentTimeMillis() - startTime; if (interval > elapsedTime) { this.wait(interval - elapsedTime); } syncContext(false); } } catch (InterruptedException ex) { log.debug("Monitoring thread was interrupted", ex); } log.debug("exiting run()"); } }
MonitoringResultsCollector extends CorrectedResultCollector implements Runnable, MonitoringSampleGenerator { @Override public synchronized void run() { try { syncContext(true); while (!stop) { long startTime = System.currentTimeMillis(); processConnectors(); long elapsedTime = System.currentTimeMillis() - startTime; if (interval > elapsedTime) { this.wait(interval - elapsedTime); } syncContext(false); } } catch (InterruptedException ex) { log.debug("Monitoring thread was interrupted", ex); } log.debug("exiting run()"); } MonitoringResultsCollector(); }
MonitoringResultsCollector extends CorrectedResultCollector implements Runnable, MonitoringSampleGenerator { @Override public synchronized void run() { try { syncContext(true); while (!stop) { long startTime = System.currentTimeMillis(); processConnectors(); long elapsedTime = System.currentTimeMillis() - startTime; if (interval > elapsedTime) { this.wait(interval - elapsedTime); } syncContext(false); } } catch (InterruptedException ex) { log.debug("Monitoring thread was interrupted", ex); } log.debug("exiting run()"); } MonitoringResultsCollector(); void setData(CollectionProperty rows); CollectionProperty getSamplerSettings(); @Override synchronized void run(); @Override void testStarted(String host); @Override void testEnded(String host); @Override void sampleOccurred(SampleEvent event); @Override void generateSample(double value, String label); @Override JMeterContext getThreadContext(); }
MonitoringResultsCollector extends CorrectedResultCollector implements Runnable, MonitoringSampleGenerator { @Override public synchronized void run() { try { syncContext(true); while (!stop) { long startTime = System.currentTimeMillis(); processConnectors(); long elapsedTime = System.currentTimeMillis() - startTime; if (interval > elapsedTime) { this.wait(interval - elapsedTime); } syncContext(false); } } catch (InterruptedException ex) { log.debug("Monitoring thread was interrupted", ex); } log.debug("exiting run()"); } MonitoringResultsCollector(); void setData(CollectionProperty rows); CollectionProperty getSamplerSettings(); @Override synchronized void run(); @Override void testStarted(String host); @Override void testEnded(String host); @Override void sampleOccurred(SampleEvent event); @Override void generateSample(double value, String label); @Override JMeterContext getThreadContext(); static final String DATA_PROPERTY; }