This commit is contained in:
yanweidong 2024-12-06 17:02:11 +08:00
parent d15e2ac414
commit 6d00554e08
1 changed files with 3 additions and 3 deletions

View File

@ -1,12 +1,12 @@
import http from 'k6/http';
export let options = {
vus: 100, // 指定要同时运行的虚拟用户数量
vus: 10, // 指定要同时运行的虚拟用户数量
duration: '10s', // 指定测试运行的总持续时间
};
// default 默认函数
export default function () {
// 标头
let params = { headers: { 'Content-Type': 'application/json' } };
let params = { headers: { 'Content-Type': 'text/html; charset=utf-8' } };
var res=http.get("https://test.k6.io",params)
var res=http.get("https://test.baidu.com",params)
}