Examples of MonitorCollectorPlugin


Examples of org.ngrinder.perftest.service.samplinglistener.MonitorCollectorPlugin

    PerfTest perfTest = mock(PerfTest.class);
    when(perfTest.getTargetHostIP()).thenReturn(Lists.newArrayList("127.0.0.1"));
    when(perfTest.getSamplingInterval()).thenReturn(2);
    SingleConsole singleConsole = mock(SingleConsole.class);
    when(singleConsole.getReportPath()).thenReturn(tempReport);
    MonitorCollectorPlugin monitorCollectorPlugin = new MonitorCollectorPlugin(config, scheduledTaskService,
        perfTestService, 1L) {
      @Override
      protected int getPort(IConfig config) {
        return 13243;
      }
    };
    monitorCollectorPlugin.startSampling(singleConsole, perfTest, perfTestService);
    ThreadUtils.sleep(2400);
    monitorCollectorPlugin.sampling(null, null, null, null, null);
    monitorCollectorPlugin.endSampling(null, null, null);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.