Package org.ngrinder.perftest.model

Examples of org.ngrinder.perftest.model.ProcessAndThread


  private PerfTestService perfTestService;

  @Test
  public void testVUser() {
    assertThat(perfTestService.getProcessAndThreadPolicyScript(), notNullValue());
    ProcessAndThread calcProcessAndThread = perfTestService.calcProcessAndThread(100);
    assertThat(calcProcessAndThread, notNullValue());
    System.out.println(calcProcessAndThread);

  }
View Full Code Here


      String script = getProcessAndThreadPolicyScript();
      ScriptEngine engine = new ScriptEngineManager().getEngineByName("javascript");
      engine.eval(script);
      int processCount = ((Double) engine.eval("getProcessCount(" + newVuser + ")")).intValue();
      int threadCount = ((Double) engine.eval("getThreadCount(" + newVuser + ")")).intValue();
      return new ProcessAndThread(processCount, threadCount);
    } catch (ScriptException e) {
      LOGGER.error("Error occurs while calc process and thread", e);
    }
    return new ProcessAndThread(1, 1);
  }
View Full Code Here

TOP

Related Classes of org.ngrinder.perftest.model.ProcessAndThread

Copyright © 2018 www.massapicom. 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.