private void start(String testName) { ResourceChecker rc = new ResourceChecker(testName); rc.addResourceAnalyzer(new ThreadResourceAnalyzer()); rc.addResourceAnalyzer(new OpenFileDescriptorResourceAnalyzer()); rc.addResourceAnalyzer(new MaxFileDescriptorResourceAnalyzer()); rc.addResourceAnalyzer(new SystemLoadAverageResourceAnalyzer()); rc.addResourceAnalyzer(new ProcessCountResourceAnalyzer()); rc.addResourceAnalyzer(new AvailableMemoryMBResourceAnalyzer()); addResourceAnalyzer(rc); rcs.put(testName, rc); rc.start(); }
public void checkInit() { check(initialValues); }
/** * To be called as the end of a test method: * - measure the resources * - check vs. the limits. * - check vs. the initial state * - logs them. */ public void end() { if (ras.isEmpty()) { LOG.info("No resource analyzer"); return; } if (initialValues == null) { LOG.warn("No initial values"); return; } fillEndings(); logEndings(); checkEndings(); }
private void fillInit() { initialValues = new int[ras.size()]; fill(Phase.INITIAL, initialValues); }
private void end(String testName) { ResourceChecker rc = rcs.remove(testName); assert rc != null; rc.end(); }
private void fillEndings() { endingValues = new int[ras.size()]; fill(Phase.END, endingValues); }
private void end(String testName) { ResourceChecker rc = rcs.remove(testName); assert rc != null; rc.end(); }
private void start(String testName) { ResourceChecker rc = new ResourceChecker(testName); rc.addResourceAnalyzer(new ThreadResourceAnalyzer()); rc.addResourceAnalyzer(new OpenFileDescriptorResourceAnalyzer()); rc.addResourceAnalyzer(new MaxFileDescriptorResourceAnalyzer()); rc.addResourceAnalyzer(new SystemLoadAverageResourceAnalyzer()); rc.addResourceAnalyzer(new ProcessCountResourceAnalyzer()); rc.addResourceAnalyzer(new AvailableMemoryMBResourceAnalyzer()); addResourceAnalyzer(rc); rcs.put(testName, rc); rc.start(); }
/** * To be called as the end of a test method: * - measure the resources * - check vs. the limits. * - check vs. the initial state * - logs them. */ public void end() { if (ras.isEmpty()) { LOG.info("No resource analyzer"); return; } if (initialValues == null) { LOG.warn("No initial values"); return; } fillEndings(); logEndings(); checkEndings(); }
private void fillInit() { initialValues = new int[ras.size()]; fill(Phase.INITIAL, initialValues); }
private void checkEndings() { check(endingValues); }
private void end(String testName) { ResourceChecker rc = rcs.remove(testName); assert rc != null; rc.end(); }
private void start(String testName) { ResourceChecker rc = new ResourceChecker(testName); rc.addResourceAnalyzer(new ThreadResourceAnalyzer()); rc.addResourceAnalyzer(new OpenFileDescriptorResourceAnalyzer()); rc.addResourceAnalyzer(new MaxFileDescriptorResourceAnalyzer()); rc.addResourceAnalyzer(new SystemLoadAverageResourceAnalyzer()); rc.addResourceAnalyzer(new ProcessCountResourceAnalyzer()); rc.addResourceAnalyzer(new AvailableMemoryMBResourceAnalyzer()); addResourceAnalyzer(rc); rcs.put(testName, rc); rc.start(); }
/** * To be called as the end of a test method: * - measure the resources * - check vs. the limits. * - check vs. the initial state * - logs them. */ public void end() { if (ras.isEmpty()) { LOG.info("No resource analyzer"); return; } if (initialValues == null) { LOG.warn("No initial values"); return; } fillEndings(); logEndings(); checkEndings(); }
private void fillInit() { initialValues = new int[ras.size()]; fill(Phase.INITIAL, initialValues); }
private void checkEndings() { check(endingValues); }
private void fillEndings() { endingValues = new int[ras.size()]; fill(Phase.END, endingValues); }