org.apache.jmeter.threads.JMeterContext.setEngine()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中org.apache.jmeter.threads.JMeterContext.setEngine()方法的一些代码示例,展示了JMeterContext.setEngine()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMeterContext.setEngine()方法的具体详情如下:
包路径:org.apache.jmeter.threads.JMeterContext
类名称:JMeterContext
方法名:setEngine

JMeterContext.setEngine介绍

[英]Internally called by JMeter, never call it directly
[中]在JMeter内部调用,不要直接调用它

代码示例

代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core

threadContext.setThread(this);
threadContext.setThreadGroup(threadGroup);
threadContext.setEngine(engine);
testTree.traverse(compiler);
if (scheduler) {

代码示例来源:origin: undera/jmeter-plugins

StandardJMeterEngine engine = new EmulatorJmeterEngine();
JMeterThreadMonitor monitor = new EmulatorThreadMonitor();
JMeterContextService.getContext().setEngine(engine);
HashTree hashtree = new HashTree();
hashtree.add(new LoopController());

代码示例来源:origin: kg.apc/jmeter-plugins-emulators

StandardJMeterEngine engine = new EmulatorJmeterEngine();
JMeterThreadMonitor monitor = new EmulatorThreadMonitor();
JMeterContextService.getContext().setEngine(engine);
HashTree hashtree = new HashTree();
hashtree.add(new LoopController());

代码示例来源:origin: kg.apc/jmeter-plugins-cmn-jmeter

/**
 * Update the worker thread jmeter context with the main thread one
 * @param isInit if true the context a full copy is done, if false only update is done
 */
private void syncContext(boolean isInit)
{
  // jmeter context synchronisation
  JMeterContext current = JMeterContextService.getContext();
  JMeterContext ctx = this.getThreadContext();
  
  if (isInit)
  {
    current.setCurrentSampler(ctx.getCurrentSampler());
    current.setEngine(ctx.getEngine());
    current.setRestartNextLoop(ctx.isRestartNextLoop());
    current.setSamplingStarted(ctx.isSamplingStarted());
    current.setThread(ctx.getThread());
    current.setThreadGroup(ctx.getThreadGroup());
    current.setThreadNum(ctx.getThreadNum());
  }
  current.setVariables(ctx.getVariables());
  current.setPreviousResult(ctx.getPreviousResult());
  //current.getSamplerContext().putAll(ctx.getSamplerContext());
}

代码示例来源:origin: undera/jmeter-plugins

/**
 * Update the worker thread jmeter context with the main thread one
 * @param isInit if true the context a full copy is done, if false only update is done
 */
private void syncContext(boolean isInit)
{
  // jmeter context synchronisation
  JMeterContext current = JMeterContextService.getContext();
  JMeterContext ctx = this.getThreadContext();
  
  if (isInit)
  {
    current.setCurrentSampler(ctx.getCurrentSampler());
    current.setEngine(ctx.getEngine());
    current.setRestartNextLoop(ctx.isRestartNextLoop());
    current.setSamplingStarted(ctx.isSamplingStarted());
    current.setThread(ctx.getThread());
    current.setThreadGroup(ctx.getThreadGroup());
    current.setThreadNum(ctx.getThreadNum());
  }
  current.setVariables(ctx.getVariables());
  current.setPreviousResult(ctx.getPreviousResult());
  //current.getSamplerContext().putAll(ctx.getSamplerContext());
}

代码示例来源:origin: undera/jmeter-plugins

/**
 * Update the worker thread jmeter context with the main thread one
 * @param isInit if true the context a full copy is done, if false only update is done
 */
private void syncContext(boolean isInit)
{
  // jmeter context synchronisation
  JMeterContext current = JMeterContextService.getContext();
  JMeterContext ctx = this.getThreadContext();
  
  if (isInit)
  {
    current.setCurrentSampler(ctx.getCurrentSampler());
    current.setEngine(ctx.getEngine());
    current.setRestartNextLoop(ctx.isRestartNextLoop());
    current.setSamplingStarted(ctx.isSamplingStarted());
    current.setThread(ctx.getThread());
    current.setThreadGroup(ctx.getThreadGroup());
    current.setThreadNum(ctx.getThreadNum());
  }
  current.setVariables(ctx.getVariables());
  current.setPreviousResult(ctx.getPreviousResult());
  //current.getSamplerContext().putAll(ctx.getSamplerContext());
}
@Override

相关文章