小编dav*_*ler的帖子

使用 python 对 API 进行负载测试

我目前正在编写用于负载测试 API 的 python 脚本。我想检查一次 API 可以接受多少请求。API 用于注册,因此我每次都必须发送唯一参数。

无论如何我可以通过蝗虫或任何其他方式实现它吗?

任何帮助,将不胜感激。

这是我的单用户注册代码。

def registration:
    URL = "ip"
    PARAMS = {'name':'test','password':'test1','primary_email':'test667@gmail.com','primary_mobile_number':'9999999999','country_abbrev':'US'} 
    r = requests.post(url = URL,params = PARAMS,auth=HTTPDigestAuth('user', 'pass')) 
    response = r.text 
    print response
Run Code Online (Sandbox Code Playgroud)

python load-testing locust

8
推荐指数
1
解决办法
9548
查看次数

Sonarqube 以退出值 [es] 退出:143

我正在使用 sonarcube cor 编码分析,当我运行 sonar.sh 文件时,出现此错误“进程以退出值 [es] 退出:143”

这是我对 sonar.properties 的配置

sonar.jdbc.url=jdbc:mysql://13.235.126.175:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
sonar.jdbc.username=s2ic
sonar.jdbc.password=S2ic@2019
sonar.web.port=9000

Run Code Online (Sandbox Code Playgroud)

我在 ec2 实例上运行 sonarqube,而我的数据库托管在另一个实例上。

我尝试在日志中搜索错误,但找不到任何内容。我做错了什么?任何帮助,将不胜感激

这是我的 web.log

2019.09.30 10:16:39 WARN  web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[_client_][transport_worker][T#4]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@11.0.4/sun.nio.ch.EPoll.wait(Native Method)
 java.base@11.0.4/sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:120)
 java.base@11.0.4/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
 java.base@11.0.4/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:136)
 app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
 app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
 app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
 app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
 java.base@11.0.4/java.lang.Thread.run(Thread.java:834)
2019.09.30 10:16:39 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2019.09.30 10:16:39 INFO …
Run Code Online (Sandbox Code Playgroud)

sonarqube

5
推荐指数
1
解决办法
2291
查看次数

标签 统计

load-testing ×1

locust ×1

python ×1

sonarqube ×1