【问题标题】:Taurus failed execute apachebenchmark on windowsTaurus 在 Windows 上执行 apachebenchmark 失败
【发布时间】:2018-12-08 09:21:56
【问题描述】:

我正在使用 Winsows 7 并下载最新的 Taraus 安装,从 ApacheServer 安装下载更新的 ApacheBenchmark。

我正在尝试使用 Taraus 的 Simplest working example 执行 ApacheBenchmark

调用bzt config.yaml,但使用Invalid number of requests 失败

execution:
- executor: ab
  scenario: simple

scenarios:
  simple:
    requests:
    - http://blazedemo.com/

但是失败了

16:16:04 INFO: Preparing...

16:16:05 INFO: Starting...

16:16:05 INFO: Waiting for results...

16:16:06 INFO: Did not mute console logging

16:16:06 INFO: Waiting for finish...

16:16:06 WARNING: ab tool exited with non-zero code: 1

16:16:06 WARNING: Please wait for graceful shutdown...

16:16:06 INFO: Shutting down...

16:16:06 INFO: Post-processing...

16:16:06 INFO: Test duration: 0:00:01

16:16:07 ERROR: Child Process Error: Empty results, most likely simple (ApacheBenchmarkExecutor) failed. Actual reason for this can be found in logs under C:\Users\User\2018-12-06_16-16-04.160200

16:16:07 ERROR: ab STDERR:

Invalid number of requests    

当我尝试第二个示例时 hold-for 使用示例 taurus 打开并崩溃

是否存在 taraus Windows 问题或已知限制?因为我缺少配置/执行参数?

  • 注意,我在安装新版本之前卸载了旧版本,并且 config.yaml 是有效的 yaml 文件

ApacheBenchmark 独立运行,例如在执行时

ab http://blazedemo.com/

详细错误 (-v)

[2018-12-13 08:31:46,400 DEBUG bzt.utils] Executing shell: ['ab', '-n', '0', '-c
', '0', '-d', '-r', '-l', '-g', 'Z:\\2018-12-13_08-31-45.916555\\ab.tsv', '-k',
'http://blazedemo.com/'] at Z:\
[2018-12-13 08:31:46,406 DEBUG Engine] Checking <bzt.modules.aggregator.Consolid
atingAggregator object at 0x0000000003D50F98>
[2018-12-13 08:31:46,407 DEBUG Engine.ab.TSVDataReader.FileReader] File not appe
ared yet: Z:\2018-12-13_08-31-45.916555\ab.tsv
[2018-12-13 08:31:46,408 DEBUG Engine.ab.TSVDataReader] Buffer len: 0; Known err
ors count: 0
[2018-12-13 08:31:46,409 DEBUG Engine.consolidator] Consolidator buffer[0]: dict
_keys([])
[2018-12-13 08:31:46,410 DEBUG Engine] Checking <bzt.modules.monitoring.Monitori
ng object at 0x0000000003D65CC0>
[2018-12-13 08:31:46,736 DEBUG Engine] Checking <bzt.modules.reporting.FinalStat
us object at 0x00000000045E5D68>
[2018-12-13 08:31:46,737 DEBUG Engine] Checking <bzt.modules.console.ConsoleStat
usReporter object at 0x00000000045D9CC0>
[2018-12-13 08:31:46,739 INFO Engine.console] Did not mute console logging
[2018-12-13 08:31:46,832 INFO Engine.console] Waiting for finish...
[2018-12-13 08:31:46,886 DEBUG Engine] Iteration took 0.488 sec, sleeping for 0.
512 sec...
[2018-12-13 08:31:47,400 DEBUG Engine] Checking <bzt.modules.provisioning.Local
object at 0x0000000003D1B400>
[2018-12-13 08:31:47,403 WARNING Engine.ab] ab tool exited with non-zero code: 1

【问题讨论】:

    标签: multithreading performance-testing load-testing apachebench taurus


    【解决方案1】:

    在我的Taurus version 1.13.1 上工作得很好:

    C:\temp>bzt -o modules.ab.path=c:/temp/ab.exe ab.yaml
    17:19:41 INFO: Taurus CLI Tool v1.13.1
    17:19:41 INFO: Starting with configs: ['ab.yaml']
    17:19:41 INFO: Configuring...
    17:19:41 INFO: Artifacts dir: C:\temp\2018-12-14_17-19-41.894000
    17:19:41 INFO: Preparing...
    17:19:42 WARNING: There is newer version of Taurus 1.13.2 available, consider upgrading. What's new: http://gettaurus.org/docs/Changelog/
    17:19:42 INFO: Starting...
    17:19:42 INFO: Waiting for results...
    17:19:42 INFO: Did not mute console logging
    17:19:42 INFO: Waiting for finish...
    17:19:43 WARNING: Please wait for graceful shutdown...
    17:19:43 INFO: Shutting down...
    17:19:43 INFO: Post-processing...
    17:19:43 INFO: Test duration: 0:00:01
    17:19:43 INFO: Samples count: 1, 0.00% failures
    17:19:43 INFO: Average times: total 0.000, latency 0.000, connect 0.000
    17:19:43 INFO: Percentiles:
    +---------------+---------------+
            | Percentile, % | Resp. Time, s |
            +---------------+---------------+
            |           0.0 |         0.253 |
            |          50.0 |         0.253 |
            |          90.0 |         0.253 |
            |          95.0 |         0.253 |
            |          99.0 |         0.253 |
            |          99.9 |         0.253 |
            |         100.0 |         0.253 |
            +---------------+---------------+
                    17:19:43 INFO: Request label stats:
            +-----------------------+--------+---------+--------+-------+
                    | label                 | status |    succ | avg_rt | error |
                    +-----------------------+--------+---------+--------+-------+
                    | http://blazedemo.com/ |   OK   | 100.00% |  0.000 |       |
    +-----------------------+--------+---------+--------+-------+
            17:19:43 INFO: Artifacts dir: C:\temp\2018-12-14_17-19-41.894000
    17:19:43 INFO: Done performing with code: 0
    

    如果你坐在一个有缺陷的版本上,你可以像这样简单地获得 Taurus v1.13.1:

    pip install bzt==1.13.1
    

    万一有Taurus Support Forum 可以联系到 Taurus 开发人员和维护人员,在那里获得更专业答案的机会要高得多。

    【讨论】:

    • 如果 ab.exe 是 windows 路径的一部分,-o 是否必要?
    【解决方案2】:

    Taurus 论坛回应称这是一个需要修复的错误并提出了解决方法:

    现在您可以使用显式并发和迭代作为解决方法:

    execution:
     - executor: ab
       iterations: 1
       concurrency: 1
    

    【讨论】:

      猜你喜欢
      • 2018-03-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多