JMeterContext----上下文
http://jmeter.apache.org/api/org/apache/jmeter/threads/JMeterContext.html
Class JMeterContext
- java.lang.Object
- org.apache.jmeter.threads.JMeterContext
- public class JMeterContext
- extends java.lang.Object
Holds context for a thread. Generated by JMeterContextService. The class is not thread-safe - it is only intended for use within a single thread.- public class JMeterContext
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
cleanAfterSample()
Clean cached data after sample Internally called by JMeter, never call it directly
|
void |
clear()
Internally called by JMeter, never call it directly
|
Sampler |
getCurrentSampler() |
StandardJMeterEngine |
getEngine() |
SampleResult |
getPreviousResult() |
Sampler |
getPreviousSampler()
Returns the previousSampler.
|
java.util.Properties |
getProperties() |
java.util.Map<java.lang.String,java.lang.Object> |
getSamplerContext()
Sampler context is cleaned up as soon as Post-Processor have ended
|
JMeterThread |
getThread() |
AbstractThreadGroup |
getThreadGroup() |
int |
getThreadNum()
Returns the threadNum.
|
JMeterVariables |
getVariables()
Gives access to the JMeter variables for the current thread.
|
boolean |
isRecording() |
boolean |
isRestartNextLoop()
Deprecated.
|
boolean |
isSamplingStarted() |
boolean |
isStartNextThreadLoop() |
void |
setCurrentSampler(Sampler sampler)
Internally called by JMeter, never call it directly
|
void |
setEngine(StandardJMeterEngine engine)
Internally called by JMeter, never call it directly
|
void |
setPreviousResult(SampleResult result)
Internally called by JMeter, never call it directly
|
void |
setRecording(boolean recording)
Internally called by JMeter, never call it directly
|
void |
setRestartNextLoop(boolean restartNextLoop)
Deprecated.
|
void |
setSamplingStarted(boolean b)
Internally called by JMeter, never call it directly
|
void |
setStartNextThreadLoop(boolean restartNextLoop) |
void |
setThread(JMeterThread thread)
Internally called by JMeter, never call it directly
|
void |
setThreadGroup(AbstractThreadGroup threadgrp)
Internally called by JMeter, never call it directly
|
void |
setThreadNum(int threadNum)
Internally called by JMeter, never call it directly
|
void |
setVariables(JMeterVariables vars)
Internally called by JMeter, never call it directly
|
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Method Detail
clear
- public void clear()
Internally called by JMeter, never call it directly
getVariables
- public JMeterVariables getVariables()
Gives access to the JMeter variables for the current thread.- Returns:
- a pointer to the JMeter variables.
getProperties
- public java.util.Properties getProperties()
- Returns:
- a pointer to the JMeter Properties.
setVariables
- public void setVariables(JMeterVariables vars)
Internally called by JMeter, never call it directly- Parameters:
vars
- JMeterVariables
getPreviousResult
- public SampleResult getPreviousResult()
setPreviousResult
- public void setPreviousResult(SampleResult result)
Internally called by JMeter, never call it directly- Parameters:
result
- SampleResult
getCurrentSampler
- public Sampler getCurrentSampler()
setCurrentSampler
- public void setCurrentSampler(Sampler sampler)
Internally called by JMeter, never call it directly- Parameters:
sampler
- Sampler
getPreviousSampler
- public Sampler getPreviousSampler()
Returns the previousSampler.- Returns:
- Sampler
getThreadNum
- public int getThreadNum()
Returns the threadNum.- Returns:
- int
setThreadNum
- public void setThreadNum(int threadNum)
Internally called by JMeter, never call it directly- Parameters:
threadNum
- number of threads
getThread
- public JMeterThread getThread()
setThread
- public void setThread(JMeterThread thread)
Internally called by JMeter, never call it directly- Parameters:
thread
- to use
getThreadGroup
- public AbstractThreadGroup getThreadGroup()
setThreadGroup
- public void setThreadGroup(AbstractThreadGroup threadgrp)
Internally called by JMeter, never call it directly- Parameters:
threadgrp
- ThreadGroup to use
getEngine
- public StandardJMeterEngine getEngine()
setEngine
- public void setEngine(StandardJMeterEngine engine)
Internally called by JMeter, never call it directly- Parameters:
engine
- to use
isSamplingStarted
- public boolean isSamplingStarted()
setSamplingStarted
- public void setSamplingStarted(boolean b)
Internally called by JMeter, never call it directly- Parameters:
b
- flag whether sampling has started
setStartNextThreadLoop
- public void setStartNextThreadLoop(boolean restartNextLoop)
- Parameters:
restartNextLoop
- if set totrue
a restart of the loop will occur
isStartNextThreadLoop
- public boolean isStartNextThreadLoop()
- Returns:
true
when current loop iteration will be interrupted and JMeter will go to next iteration
setRestartNextLoop
- @Deprecated
- public void setRestartNextLoop(boolean restartNextLoop)
Deprecated. usesetStartNextThreadLoop(boolean)
if set totrue
current loop iteration will be interrupted and JMeter will go to next iteration- Parameters:
restartNextLoop
- flag whether to restart
- @Deprecated
isRestartNextLoop
- @Deprecated
- public boolean isRestartNextLoop()
Deprecated. useisStartNextThreadLoop()
- Returns:
- flag whether restart is set
- @Deprecated
cleanAfterSample
- public void cleanAfterSample()
Clean cached data after sample Internally called by JMeter, never call it directly
getSamplerContext
- public java.util.Map<java.lang.String,java.lang.Object> getSamplerContext()
Sampler context is cleaned up as soon as Post-Processor have ended- Returns:
- Context to use within PostProcessors to cache data
setRecording
- public void setRecording(boolean recording)
Internally called by JMeter, never call it directly- Parameters:
recording
- flag whether recording should be done
isRecording
- public boolean isRecording()
JMeterContext----上下文的更多相关文章
- 谈谈一些有趣的CSS题目(三)-- 层叠顺序与堆栈上下文知多少
开本系列,讨论一些有趣的 CSS 题目,抛开实用性而言,一些题目为了拓宽一下解决问题的思路,此外,涉及一些容易忽视的 CSS 细节. 解题不考虑兼容性,题目天马行空,想到什么说什么,如果解题中有你感觉 ...
- 如何一步一步用DDD设计一个电商网站(七)—— 实现售价上下文
阅读目录 前言 明确业务细节 建模 实现 结语 一.前言 上一篇我们已经确立的购买上下文和销售上下文的交互方式,传送门在此:http://www.cnblogs.com/Zachary-Fan/p/D ...
- 如何一步一步用DDD设计一个电商网站(六)—— 给购物车加点料,集成售价上下文
阅读目录 前言 如何在一个项目中实现多个上下文的业务 售价上下文与购买上下文的集成 结语 一.前言 前几篇已经实现了一个最简单的购买过程,这次开始往这个过程中增加一些东西.比如促销.会员价等,在我们的 ...
- CSS——关于z-index及层叠上下文(stacking context)
以下内容根据CSS规范翻译. z-index 'z-index'Value: auto | <integer> | inheritInitial: autoApplies to: posi ...
- EF上下文对象线程内唯一性与优化
在一次请求中,即一个线程内,若是用到EF数据上下文对象,就创建一个,这也加是很多人的代码中习惯在使用上下文对象时,习惯将对象建立在using中,也是为了尽早释放上下文对象, 但是如果有一个业务逻辑调用 ...
- 【.NET深呼吸】基于异步上下文的本地变量(AsyncLocal)
在开始吹牛之前,老周说两个故事. 第一个故事是关于最近某些别有用心的人攻击.net的事,其实我们不用管它们,只要咱们知道自己是.net爱好者就行了,咱们就是因为热爱.net才会选择它.这些人在这段时间 ...
- 【.NET深呼吸】应用上下文(AppContext)
在.net 4.6中新增了一个类,叫AppContext,这个家伙嘛,技术含量不算高,只不过是在编程的时候可以方便用用而已.应用上下文允许定义一个标识(用字符串表示),并且在应用程序运行期间可以切换状 ...
- Javascript的“上下文”(context)
一:JavaScript中的“上下文“指的是什么 百科中这样定义: 上下文是从英文context翻译过来,指的是一种环境. 在软件工程中,上下文是一种属性的有序序列,它们为驻留在环境内的对象定义环境. ...
- IDDD 实现领域驱动设计-理解限界上下文
上一篇:<IDDD 实现领域驱动设计-理解领域和子域> <实现领域驱动设计>前两章内容,基本上读完了,和<领域驱动设计>不同的是,它把很多的概念都放在前面进行讲述了 ...
- IDDD 实现领域驱动设计-上下文映射图及其相关概念
上一篇:<IDDD 实现领域驱动设计-理解限界上下文> 距离上一篇有几天时间了,<实现领域驱动设计>第三章的内容都是围绕一个词-上下文映射图,我大概断断续续看了几天,总共看了两 ...
随机推荐
- (新手入门,学习笔记)通过NPM进行Vue.js的安装
NPM是随同NodeJS一起安装的包管理工具,能解决NodeJS代码部署上的很多问题,本文只介绍如何通过NPM进行安装Vue.js NodeJS官方网站:http://nodejs.cn/downlo ...
- logname - 显示用户登录名
总览 (SYNOPSIS) logname [OPTION]... 描述 (DESCRIPTION) 显示 当前用户 的 名字. --help 显示 帮助信息, 然后 结束. --version 显示 ...
- 连接数据库出现错误:1045-Access denied for user 'root'@'localhost'解决方法
Navicat for MySQL 链接: https://pan.baidu.com/s/1slwQxVB 密码: r737 1.出现这个问题的原因之一是权限的问题,也就是说你的电脑可能没有权限访问 ...
- dockerfile制作笔记
dockerfile语法格式: FROM: 基础镜像(就是在什么镜像上面做) MAINTAINER: 镜像创建者信息(作者的信息) EXPOSE: 开放的端口 ENV: 设置变量 ...
- zabbix 安装中文无法显示的问题
vi /usr/share/zabbix/include/locales.inc.php把zh_CN后面参数写true 然后去选择语言吧. 如果,去选择语言的时候,你发现还是不能选择....提示:Yo ...
- devicetree推荐教程
https://www.cnblogs.com/aaronLinux/p/5496559.html
- 图解NuGet服务器搭建和使用过程
听语音 浏览:0 | 更新:2017-10-31 09:13 | 标签:服务器 1 2 3 4 5 6 7 分步阅读 本篇经验将和大家介绍内网搭建NuGet服务器的步骤,希望对大家的工作和学习有所帮助 ...
- bzoj4810 [Ynoi2017]由乃的玉米田 莫队+bitset(+数论)
题目传送门 https://lydsy.com/JudgeOnline/problem.php?id=4810 题解 看数据范围和题目名字应该是根号算法. 因为询问除了区间外,还有第 \(3\) 个参 ...
- Django【第9篇】:Django之用户认证auth模块
用户认证--------------auth模块 一.auth模块 from django.contrib import auth 1 .authenticate() :验证用户输入的用户名和密码 ...
- iOS各别版本new Date().getTime 获取时间戳为null问题
正常逻辑 new Date('2019-9-8').getTime() 注意日期格式 yyyy--mm-dd 因为yyyy/mm/dd也有兼容性问题 但是各别iOS版本不支持 // IOS 获取时间戳 ...