@Test public void simpleTest() throws Exception { String[] args = new String[]{ "--warmup-iterations", "10", "-h", "localhost", "--port", Integer.toString(connector.getLocalPort()), "--running-time", "10", "--running-time-unit", "s", "--resource-rate", "3", "--transport", "http", "--users", "3", "--resource-groovy-path", "src/test/resources/tree_resources.groovy" }; LoadGeneratorStarter.main(args); int getNumber = testServlet.getNumber.get(); LOGGER.debug("received get: {}", getNumber); Assert.assertTrue("getNumber return: " + getNumber, getNumber > 10); }
public static void main(String[] args) { LoadGeneratorStarterArgs starterArgs = parse(args); if (starterArgs == null) { return; } LoadGenerator.Builder builder = prepare(starterArgs); GlobalSummaryListener globalSummaryListener = new GlobalSummaryListener(); builder = builder.resourceListener(globalSummaryListener).requestListener(globalSummaryListener); run(builder); if (starterArgs.isDisplayStats()) { displayGlobalSummaryListener(globalSummaryListener); } }
LoadGeneratorStarter { public static void main(String[] args) { LoadGeneratorStarterArgs starterArgs = parse(args); if (starterArgs == null) { return; } LoadGenerator.Builder builder = prepare(starterArgs); GlobalSummaryListener globalSummaryListener = new GlobalSummaryListener(); builder = builder.resourceListener(globalSummaryListener).requestListener(globalSummaryListener); run(builder); if (starterArgs.isDisplayStats()) { displayGlobalSummaryListener(globalSummaryListener); } } }
LoadGeneratorStarter { public static void main(String[] args) { LoadGeneratorStarterArgs starterArgs = parse(args); if (starterArgs == null) { return; } LoadGenerator.Builder builder = prepare(starterArgs); GlobalSummaryListener globalSummaryListener = new GlobalSummaryListener(); builder = builder.resourceListener(globalSummaryListener).requestListener(globalSummaryListener); run(builder); if (starterArgs.isDisplayStats()) { displayGlobalSummaryListener(globalSummaryListener); } }  }
LoadGeneratorStarter { public static void main(String[] args) { LoadGeneratorStarterArgs starterArgs = parse(args); if (starterArgs == null) { return; } LoadGenerator.Builder builder = prepare(starterArgs); GlobalSummaryListener globalSummaryListener = new GlobalSummaryListener(); builder = builder.resourceListener(globalSummaryListener).requestListener(globalSummaryListener); run(builder); if (starterArgs.isDisplayStats()) { displayGlobalSummaryListener(globalSummaryListener); } }  static void main(String[] args); static LoadGeneratorStarterArgs parse(String[] args); static T parse(String[] args, Supplier<T> argsSupplier); static LoadGenerator.Builder prepare(LoadGeneratorStarterArgs starterArgs); static void run(LoadGenerator.Builder builder); static void run(LoadGenerator loadGenerator); }
LoadGeneratorStarter { public static void main(String[] args) { LoadGeneratorStarterArgs starterArgs = parse(args); if (starterArgs == null) { return; } LoadGenerator.Builder builder = prepare(starterArgs); GlobalSummaryListener globalSummaryListener = new GlobalSummaryListener(); builder = builder.resourceListener(globalSummaryListener).requestListener(globalSummaryListener); run(builder); if (starterArgs.isDisplayStats()) { displayGlobalSummaryListener(globalSummaryListener); } }  static void main(String[] args); static LoadGeneratorStarterArgs parse(String[] args); static T parse(String[] args, Supplier<T> argsSupplier); static LoadGenerator.Builder prepare(LoadGeneratorStarterArgs starterArgs); static void run(LoadGenerator.Builder builder); static void run(LoadGenerator loadGenerator);  }