摘要报告字节/秒和字节吞吐量随时间变化的插件 JMeter 之间的差异

问题描述 投票:0回答:1

我试图分析吞吐量 - 基本上是 JMeter 在负载测试期间发送和接收的字节数,但我注意到摘要报告和插件给出了两个不同的值,我无法关联。

摘要报告快照 -

summary report

插件图表快照 -

plugin graph

从上图中提取的值 -

values from graph in csv 平均为 608 字节/秒 总和为 10948 字节/秒

我如何正确理解要采用的正确吞吐量值以及应将哪一个视为图形插件的平均值或总和与摘要报告不匹配

从图表中提取的值 -

平均为 608 字节/秒 总和为 10948 字节/秒

取自总结报告的值 - 平均为 437 字节

jmeter jmeter-5.0 throughput
1个回答
0
投票

我想出了一个测试计划:

  1. 使用JSR223 SamplersetUp Thread Group
  2. 中生成1024字节的文件
  3. 使用HTTP请求采样器和
    file
    协议来读取文件

我收到以下 .jtl 结果文件

这在总结报告听众中得到了完美的体现:

并在随时间变化的字节吞吐量监听器中:

换句话说,我无法重现您的问题,请确保您“关联”相同的 .jtl 结果文件,使用正确的粒度等。此外,无需从图表中“提取”数据,它会绘制.jtl 结果文件中的数字。如果您想查看代码 - 可以在 github

中找到

这是我的测试计划,以防万一您想亲自看看:

<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.3">
    <hashTree>
        <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan">
            <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
                <collectionProp name="Arguments.arguments"/>
            </elementProp>
        </TestPlan>
        <hashTree>
            <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="setUp Thread Group">
                <intProp name="ThreadGroup.num_threads">1</intProp>
                <intProp name="ThreadGroup.ramp_time">1</intProp>
                <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
                <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
                <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
                    <stringProp name="LoopController.loops">1</stringProp>
                    <boolProp name="LoopController.continue_forever">false</boolProp>
                </elementProp>
            </SetupThreadGroup>
            <hashTree>
                <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="JSR223 Sampler">
                    <stringProp name="cacheKey">true</stringProp>
                    <stringProp name="filename"></stringProp>
                    <stringProp name="parameters"></stringProp>
                    <stringProp name="script">SampleResult.setIgnore()
                        new File(&apos;test.txt&apos;).text = &apos;a&apos; * 1024
                    </stringProp>
                    <stringProp name="scriptLanguage">groovy</stringProp>
                </JSR223Sampler>
                <hashTree/>
            </hashTree>
            <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group">
                <intProp name="ThreadGroup.num_threads">1</intProp>
                <intProp name="ThreadGroup.ramp_time">1</intProp>
                <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
                <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
                <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
                    <stringProp name="LoopController.loops">10</stringProp>
                    <boolProp name="LoopController.continue_forever">false</boolProp>
                </elementProp>
            </ThreadGroup>
            <hashTree>
                <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request">
                    <stringProp name="HTTPSampler.protocol">file</stringProp>
                    <stringProp name="HTTPSampler.path">test.txt</stringProp>
                    <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
                    <stringProp name="HTTPSampler.method">GET</stringProp>
                    <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
                    <boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
                    <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
                        <collectionProp name="Arguments.arguments"/>
                    </elementProp>
                </HTTPSamplerProxy>
                <hashTree>
                    <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer">
                        <stringProp name="ConstantTimer.delay">1000</stringProp>
                    </ConstantTimer>
                    <hashTree/>
                </hashTree>
            </hashTree>
        </hashTree>
    </hashTree>
</jmeterTestPlan>
© www.soinside.com 2019 - 2024. All rights reserved.