我正在与JSR233合作进行SFTP PE测试。以下是一个粗糙的流程图。 现在,我想仅捕获文件删除的事务时间。我们如何在Jmeter中实现这一目标?
I am working with JSR233 for sFTP PE testing. following is a rough flow diagram. Now I want to capture transaction time for file drop only. how can we achieve this in jmeter ?
有两个选项:
添加 subresult 对于每个步骤,即
def stapenconnection = new org.apache.jmeter.samplers.sampleresult() stuperconnection.samplestart() //代码建立连接 stuperconnection.setsamplelabel('建立连接') 建立Connection.setsuccessful(true) shopenconnection.sampleend() 采样 def dropfile = new org.apache.jmeter.samplers.sampleresult() dropfile.samplestart() //代码删除文件 dropfile.setsamplelabel('drop file') dropfile.setsuccessful(true) dropfile.sampleend() Sampleresult.AddSubresult(Dropfile)
因此,您将为每个动作获得单独的子归因:
您可以覆盖JSR223采样器经过的时间,并从 jsr223 Postprocessor 带有简单的代码
prev.elapsedtime = 1000 //用IE Jmeter变量替换1000
有关jmeter中刻板脚本的更多信息:
There are 2 options:
Add a SubResult for each step i.e.
def establishConnection = new org.apache.jmeter.samplers.SampleResult() establishConnection.sampleStart() //code to establish connection establishConnection.setSampleLabel('Establish Connection') establishConnection.setSuccessful(true) establishConnection.sampleEnd() SampleResult.addSubResult(establishConnection) def dropFile = new org.apache.jmeter.samplers.SampleResult() dropFile.sampleStart() //code to drop the file dropFile.setSampleLabel('Drop File') dropFile.setSuccessful(true) dropFile.sampleEnd() SampleResult.addSubResult(dropFile)
so you will get separate sub-result for each action:
You can overwrite the JSR223 Sampler elapsed time with an arbitrary value from the JSR223 PostProcessor with the simple code like:
prev.elapsedTime = 1000 //replace 1000 with i.e. JMeter Variable holding the value of "drop file" event
More information on Groovy scripting in JMeter: Apache Groovy - Why and How You Should Use It
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(1)
有两个选项:
添加 subresult 对于每个步骤,即
因此,您将为每个动作获得单独的子归因:
您可以覆盖JSR223采样器经过的时间,并从 jsr223 Postprocessor 带有简单的代码
有关jmeter中刻板脚本的更多信息:
There are 2 options:
Add a SubResult for each step i.e.
so you will get separate sub-result for each action:
You can overwrite the JSR223 Sampler elapsed time with an arbitrary value from the JSR223 PostProcessor with the simple code like:
More information on Groovy scripting in JMeter: Apache Groovy - Why and How You Should Use It