gpt4 book ai didi

Jmeter - 吞吐量 Controller 下 “Per User” 复选框的功能是什么?

转载 作者:行者123 更新时间:2023-12-01 13:39:44 25 4
gpt4 key购买 nike

我需要用一些百分比来划分我的应用程序的负载,即登录模块 - 60%,帐户 - 10%,其他模块 - 30%。经过一番研究,我在 下找到了一个选项吞吐量 Controller jmeter 中的部分,我可以使用它来控制这些百分比。我在那里找到一个名为“每个用户”的复选框。现在我没有得到这个复选框。

根据 blazemeter 博客,我尝试了以下一种方案,其中“每个用户”复选框 已检查 .

  • 从下拉列表中选择“总执行”。
  • 将吞吐量标记为 40。
  • 使用的线程 - 10,循环计数 1

  • 现在,根据博客的具体事务应该执行 400 次。但该交易的执行为零。

    我用“每个用户”复选框尝试了另一个场景 已检查 .
  • 从下拉列表中选择“总执行”。
  • 将吞吐量标记为 60。
  • 使用的线程 - 10,循环计数 1

  • 现在,根据博客的具体事务应该执行 600 次。但它执行了 10 次。

    那里的任何专家都可以分享我在这里做错了什么吗?或者需要更清楚地了解此复选框的工作原理。

    最佳答案

    了解Throughput Controller (TC),只需添加一个 TC 和一个采样器(TC 内部)和 Aggregate Report结合。然后,使用 Throughput Controller 中的所有参数.

    来自官方文档:

    Total executions: causes the controller to stop executing after a certain number of executions have occurred.





    Per User: If checked, per user will cause the controller to calculate whether it should execute on a per user (per thread) basis. If unchecked, then the calculation will be global for all users. For example, if using total execution mode, and uncheck "per user", then the number given for throughput will be the total number of executions made. If "per user" is checked, then the total number of executions would be the number of users times the number given for throughput.



    多次仔细阅读这两个陈述。

    在您指定的两种方案中,最多执行 10 次。(线程计数 * 循环计数)。尽管您将 Total Executions 指定为 40 或 60,但首先,您应该提供超过 60 个,才能看到所有这些 40/60 迭代都被执行。因此,始终指定比总执行次数更多的迭代(使用线程计数和循环计数)。
    You have to consider Percentage Executions instead of Total Executions to match your requirements .同样,我建议模拟一个样本并通过改变百分比来了解行为。

    以下是一些场景和预期行为 (EB)。

    场景:1

    线程组 - 10,循环计数 - 1,吞吐量 - 40(总执行次数),每个用户 - 检查。

    EB:Sampler 只会运行 10 次。

    场景:2

    线程组 - 40,循环计数 - 1,吞吐量 - 40(总执行次数),每个用户 - 已检查 .

    EB:Sampler 将只运行 40 次。

    场景:3

    线程组 - 40,循环计数 - 1,吞吐量 - 40(总执行次数),每个用户 - 未选中 .

    EB:Sampler 将只运行 40 次。

    场景:4

    线程组 - 100,循环计数 - 1,吞吐量 - 40(总执行次数),每个用户 - 已检查 .

    EB:Sampler 只会运行 100 次。计算每个用户是否执行 40 次。由于未达到限制,它将执行所有 100 次迭代。

    场景:5

    线程组 - 100,循环计数 - 1,吞吐量 - 40(总执行次数),每个用户 - 未选中 .

    EB:Sampler 将只运行 40 次。在全局层面计算。当所有线程的采样器达到 40 次时,停止执行它。

    场景:6

    线程组 - 100,循环计数 - 40,吞吐量 - 40(总执行次数),每个用户 - 已检查 .

    EB:采样器将运行 400 次(每个用户 -> 40 次,100*40)。计算每个用户是否执行 40 次。在这里,即使每个用户也达到了限制,并且在 40 之后不再执行。

    场景:7

    线程组 - 100,循环计数 - 1,吞吐量 - 40(总执行次数),每个用户 - 未选中 .

    EB:Sampler 将只运行 40 次。在全局层面计算。当所有线程的采样器达到 40 次时,停止执行它。

    关于Jmeter - 吞吐量 Controller 下 “Per User” 复选框的功能是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41281778/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com