本文整理汇总了Java中org.apache.jmeter.samplers.AbstractSampler类的典型用法代码示例。如果您正苦于以下问题:Java AbstractSampler类的具体用法?Java AbstractSampler怎么用?Java AbstractSampler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractSampler类属于org.apache.jmeter.samplers包,在下文中一共展示了AbstractSampler类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getElementType
import org.apache.jmeter.samplers.AbstractSampler; //导入依赖的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;
}
}