• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PreProcessor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.jmeter.processor.PreProcessor的典型用法代码示例。如果您正苦于以下问题:Java PreProcessor类的具体用法?Java PreProcessor怎么用?Java PreProcessor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PreProcessor类属于org.apache.jmeter.processor包,在下文中一共展示了PreProcessor类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: SamplePackage

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
public SamplePackage(
        List<ConfigTestElement> configs,
        List<SampleListener> listeners,
        List<Timer> timers,
        List<Assertion> assertions, 
        List<PostProcessor> postProcessors, 
        List<PreProcessor> preProcessors,
        List<Controller> controllers) {
    this.configs = configs;
    this.sampleListeners = listeners;
    this.timers = timers;
    this.assertions = assertions;
    this.postProcessors = postProcessors;
    this.preProcessors = preProcessors;
    this.controllers = controllers;
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:17,代码来源:SamplePackage.java


示例2: saveTransactionControllerConfigs

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
private void saveTransactionControllerConfigs(TransactionController tc) {
    List<ConfigTestElement> configs = new LinkedList<>();
    List<Controller> controllers = new LinkedList<>();
    List<SampleListener> listeners = new LinkedList<>();
    List<Timer> timers = new LinkedList<>();
    List<Assertion> assertions = new LinkedList<>();
    LinkedList<PostProcessor> posts = new LinkedList<>();
    LinkedList<PreProcessor> pres = new LinkedList<>();
    for (int i = stack.size(); i > 0; i--) {
        addDirectParentControllers(controllers, stack.get(i - 1));
        for (Object item : testTree.list(stack.subList(0, i))) {
            if (item instanceof SampleListener) {
                listeners.add((SampleListener) item);
            }
            if (item instanceof Assertion) {
                assertions.add((Assertion) item);
            }
        }
    }

    SamplePackage pack = new SamplePackage(configs, listeners, timers, assertions,
            posts, pres, controllers);
    pack.setSampler(new TransactionSampler(tc, tc.getName()));
    pack.setRunningVersion(true);
    transactionControllerConfigMap.put(tc, pack);
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:27,代码来源:TestCompiler.java


示例3: saveTransactionControllerConfigs

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
private void saveTransactionControllerConfigs(TransactionController tc) {
    List<ConfigTestElement> configs = new LinkedList<ConfigTestElement>();
    List<Controller> controllers = new LinkedList<Controller>();
    List<SampleListener> listeners = new LinkedList<SampleListener>();
    List<Timer> timers = new LinkedList<Timer>();
    List<Assertion> assertions = new LinkedList<Assertion>();
    LinkedList<PostProcessor> posts = new LinkedList<PostProcessor>();
    LinkedList<PreProcessor> pres = new LinkedList<PreProcessor>();
    for (int i = stack.size(); i > 0; i--) {
        addDirectParentControllers(controllers, stack.get(i - 1));
        for (Object item : testTree.list(stack.subList(0, i))) {
            if (item instanceof SampleListener) {
                listeners.add((SampleListener) item);
            }
            if (item instanceof Assertion) {
                assertions.add((Assertion) item);
            }
        }
    }

    SamplePackage pack = new SamplePackage(configs, listeners, timers, assertions,
            posts, pres, controllers);
    pack.setSampler(new TransactionSampler(tc, tc.getName()));
    pack.setRunningVersion(true);
    transactionControllerConfigMap.put(tc, pack);
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:27,代码来源:TestCompiler.java


示例4: getAlteredElement

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
private TestElement getAlteredElement(TestElement cloned) {
    boolean isWrappable = !(cloned instanceof TransactionController) && !(cloned instanceof TestFragmentController) && !(cloned instanceof ReplaceableController);

    TestElement userObject = cloned;
    if (!isWrappable) {
        log.debug("Forcing unwrapped: " + cloned);
    } else if (cloned instanceof AbstractThreadGroup) {
        userObject = new DebuggingThreadGroup();
        userObject.setProperty(TestElement.GUI_CLASS, DebuggingThreadGroupGui.class.getCanonicalName());
    } else if (cloned instanceof Controller) {
        userObject = getController(cloned);
    } else if (cloned instanceof PreProcessor) {
        userObject = new PreProcessorDebug();
    } else if (cloned instanceof Timer) {
        userObject = new TimerDebug();
    } else if (cloned instanceof Sampler) {
        userObject = new SamplerDebug();
    } else if (cloned instanceof PostProcessor) {
        userObject = new PostProcessorDebug();
    } else if (cloned instanceof Assertion) {
        userObject = new AssertionDebug();
    } else if (cloned instanceof SampleListener) {
        userObject = new SampleListenerDebug();
    } else {
        log.debug("Keeping element unwrapped: " + cloned);
    }
    return userObject;
}
 
开发者ID:Blazemeter,项目名称:jmeter-debugger,代码行数:29,代码来源:TreeClonerTG.java


示例5: runPreProcessors

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
private void runPreProcessors(List<PreProcessor> preProcessors) {
    for (PreProcessor ex : preProcessors) {
        if (log.isDebugEnabled()) {
            log.debug("Running preprocessor: " + ((AbstractTestElement) ex).getName());
        }
        TestBeanHelper.prepare((TestElement) ex);
        ex.process();
    }
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:10,代码来源:JMeterThread.java


示例6: getElementType

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
public static ModelType getElementType(Object ele) {
	//first be sure it's a test element
	if(!(ele instanceof TestElement)) 
		return ModelType.unknown;
	
	if(ele instanceof AbstractThreadGroup) {
		return ModelType.thread_group;
	}else if (ele instanceof Assertion) {
		return ModelType.assertion;
	}else if (ele instanceof ConfigTestElement || ele instanceof ConfigElement) { 
		return ModelType.config;
	}else if (ele instanceof Controller) {
		return ModelType.controller;
	}else if (ele instanceof AbstractListenerElement) {
		return ModelType.listener;
	}else if (ele instanceof PostProcessor ) {
		return ModelType.post_processor;
	}else if (ele instanceof PreProcessor ) {
		return ModelType.pre_processor;
	}else if (ele instanceof AbstractSampler) {
		return ModelType.sampler;
	}else if(ele instanceof TestPlan) {
		return ModelType.testplan;
	}else if(ele instanceof Timer) {
		return ModelType.timer;
	}else if(ele instanceof WorkBench) {
		return ModelType.workbench;
	}else {
		return ModelType.unknown;
	}
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:32,代码来源:TestElementModel.java


示例7: createPopupMenu

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public JPopupMenu createPopupMenu() {
    if (Timer.class.isAssignableFrom(testBeanClass))
    {
        return MenuFactory.getDefaultTimerMenu();
    }
    else if(Sampler.class.isAssignableFrom(testBeanClass))
    {
        return MenuFactory.getDefaultSamplerMenu();
    }
    else if(ConfigElement.class.isAssignableFrom(testBeanClass))
    {
        return MenuFactory.getDefaultConfigElementMenu();
    }
    else if(Assertion.class.isAssignableFrom(testBeanClass))
    {
        return MenuFactory.getDefaultAssertionMenu();
    }
    else if(PostProcessor.class.isAssignableFrom(testBeanClass) ||
            PreProcessor.class.isAssignableFrom(testBeanClass))
    {
        return MenuFactory.getDefaultExtractorMenu();
    }
    else if(Visualizer.class.isAssignableFrom(testBeanClass))
    {
        return MenuFactory.getDefaultVisualizerMenu();
    }
    else if(Controller.class.isAssignableFrom(testBeanClass))
    {
        return MenuFactory.getDefaultControllerMenu();
    }
    else {
        log.warn("Cannot determine PopupMenu for "+testBeanClass.getName());
        return MenuFactory.getDefaultMenu();
    }
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:40,代码来源:TestBeanGUI.java


示例8: runPreProcessors

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
@SuppressWarnings("deprecation") // OK to call TestBeanHelper.prepare()
private void runPreProcessors(List<PreProcessor> preProcessors) {
    for (PreProcessor ex : preProcessors) {
        if (log.isDebugEnabled()) {
            log.debug("Running preprocessor: " + ((AbstractTestElement) ex).getName());
        }
        TestBeanHelper.prepare((TestElement) ex);
        ex.process();
    }
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:11,代码来源:JMeterThread.java


示例9: saveSamplerConfigs

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
private void saveSamplerConfigs(Sampler sam) {
    List<ConfigTestElement> configs = new LinkedList<>();
    List<Controller> controllers = new LinkedList<>();
    List<SampleListener> listeners = new LinkedList<>();
    List<Timer> timers = new LinkedList<>();
    List<Assertion> assertions = new LinkedList<>();
    LinkedList<PostProcessor> posts = new LinkedList<>();
    LinkedList<PreProcessor> pres = new LinkedList<>();
    for (int i = stack.size(); i > 0; i--) {
        addDirectParentControllers(controllers, stack.get(i - 1));
        List<PreProcessor>  tempPre = new LinkedList<>();
        List<PostProcessor> tempPost = new LinkedList<>();
        for (Object item : testTree.list(stack.subList(0, i))) {
            if ((item instanceof ConfigTestElement)) {
                configs.add((ConfigTestElement) item);
            }
            if (item instanceof SampleListener) {
                listeners.add((SampleListener) item);
            }
            if (item instanceof Timer) {
                timers.add((Timer) item);
            }
            if (item instanceof Assertion) {
                assertions.add((Assertion) item);
            }
            if (item instanceof PostProcessor) {
                tempPost.add((PostProcessor) item);
            }
            if (item instanceof PreProcessor) {
                tempPre.add((PreProcessor) item);
            }
        }
        pres.addAll(0, tempPre);
        posts.addAll(0, tempPost);
    }

    SamplePackage pack = new SamplePackage(configs, listeners, timers, assertions,
            posts, pres, controllers);
    pack.setSampler(sam);
    pack.setRunningVersion(true);
    samplerConfigMap.put(sam, pack);
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:43,代码来源:TestCompiler.java


示例10: setupGuiClasses

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
/**
 * Setup GUI class
 * @param menuCategories List<String> menu categories
 * @return number of matches
 */
private int setupGuiClasses(List<String> menuCategories ) {
    int matches = 0;// How many classes can we assign from?
    // TODO: there must be a nicer way...
    BeanDescriptor bd = beanInfo.getBeanDescriptor();
    if (Assertion.class.isAssignableFrom(testBeanClass)) {
        menuCategories.add(MenuFactory.ASSERTIONS);
        bd.setValue(TestElement.GUI_CLASS, AbstractAssertionGui.class.getName());
        matches++;
    }
    if (ConfigElement.class.isAssignableFrom(testBeanClass)) {
        menuCategories.add(MenuFactory.CONFIG_ELEMENTS);
        bd.setValue(TestElement.GUI_CLASS, AbstractConfigGui.class.getName());
        matches++;
    }
    if (Controller.class.isAssignableFrom(testBeanClass)) {
        menuCategories.add(MenuFactory.CONTROLLERS);
        bd.setValue(TestElement.GUI_CLASS, AbstractControllerGui.class.getName());
        matches++;
    }
    if (Visualizer.class.isAssignableFrom(testBeanClass)) {
        menuCategories.add(MenuFactory.LISTENERS);
        bd.setValue(TestElement.GUI_CLASS, AbstractVisualizer.class.getName());
        matches++;
    }
    if (PostProcessor.class.isAssignableFrom(testBeanClass)) {
        menuCategories.add(MenuFactory.POST_PROCESSORS);
        bd.setValue(TestElement.GUI_CLASS, AbstractPostProcessorGui.class.getName());
        matches++;
    }
    if (PreProcessor.class.isAssignableFrom(testBeanClass)) {
        menuCategories.add(MenuFactory.PRE_PROCESSORS);
        bd.setValue(TestElement.GUI_CLASS, AbstractPreProcessorGui.class.getName());
        matches++;
    }
    if (Sampler.class.isAssignableFrom(testBeanClass)) {
        menuCategories.add(MenuFactory.SAMPLERS);
        bd.setValue(TestElement.GUI_CLASS, AbstractSamplerGui.class.getName());
        matches++;
    }
    if (Timer.class.isAssignableFrom(testBeanClass)) {
        menuCategories.add(MenuFactory.TIMERS);
        bd.setValue(TestElement.GUI_CLASS, AbstractTimerGui.class.getName());
        matches++;
    }
    return matches;
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:52,代码来源:TestBeanGUI.java


示例11: saveSamplerConfigs

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
private void saveSamplerConfigs(Sampler sam) {
    List<ConfigTestElement> configs = new LinkedList<ConfigTestElement>();
    List<Controller> controllers = new LinkedList<Controller>();
    List<SampleListener> listeners = new LinkedList<SampleListener>();
    List<Timer> timers = new LinkedList<Timer>();
    List<Assertion> assertions = new LinkedList<Assertion>();
    LinkedList<PostProcessor> posts = new LinkedList<PostProcessor>();
    LinkedList<PreProcessor> pres = new LinkedList<PreProcessor>();
    for (int i = stack.size(); i > 0; i--) {
        addDirectParentControllers(controllers, stack.get(i - 1));
        List<PreProcessor>  tempPre = new LinkedList<PreProcessor> ();
        List<PostProcessor> tempPost = new LinkedList<PostProcessor>();
        for (Object item : testTree.list(stack.subList(0, i))) {
            if ((item instanceof ConfigTestElement)) {
                configs.add((ConfigTestElement) item);
            }
            if (item instanceof SampleListener) {
                listeners.add((SampleListener) item);
            }
            if (item instanceof Timer) {
                timers.add((Timer) item);
            }
            if (item instanceof Assertion) {
                assertions.add((Assertion) item);
            }
            if (item instanceof PostProcessor) {
                tempPost.add((PostProcessor) item);
            }
            if (item instanceof PreProcessor) {
                tempPre.add((PreProcessor) item);
            }
        }
        pres.addAll(0, tempPre);
        posts.addAll(0, tempPost);
    }

    SamplePackage pack = new SamplePackage(configs, listeners, timers, assertions,
            posts, pres, controllers);
    pack.setSampler(sam);
    pack.setRunningVersion(true);
    samplerConfigMap.put(sam, pack);
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:43,代码来源:TestCompiler.java


示例12: addPreProcessor

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
/**
 * Add Pre processor
 * @param pre {@link PreProcessor}
 */
public void addPreProcessor(PreProcessor pre) {
    preProcessors.add(pre);
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:8,代码来源:SamplePackage.java


示例13: getPreProcessors

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
/**
 * Returns the preProcessors.
 * @return List of {@link PreProcessor}
 */
public List<PreProcessor> getPreProcessors() {
    return preProcessors;
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:8,代码来源:SamplePackage.java


示例14: getPreProcessors

import org.apache.jmeter.processor.PreProcessor; //导入依赖的package包/类
/**
 * Returns the preProcessors.
 * @return List<PreProcessor>
 */
public List<PreProcessor> getPreProcessors() {
    return preProcessors;
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:8,代码来源:SamplePackage.java



注:本文中的org.apache.jmeter.processor.PreProcessor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PageShown类代码示例发布时间:2022-05-23
下一篇:
Java Link类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap