locust启动命令
locust运行测试脚本
locust -f .\load_test.py --host=https://www.baidu.com
- -f 指定性能测试脚本文件。
- --host 指定被测试应用的URL的地址,注意访问百度使用的HTTPS协议。
no-web 模式运行测试
locust -f load_test.py --host=https://www.baidu.com --no-web -c 10 -r 2 -t 1m
启动参数:
- --no-web 表示不使用Web界面运行测试。
- -c 设置虚拟用户数。
- -r 设置每秒启动虚拟用户数。
- -t 设置设置运行时间。
分布式运行
在master模式下启动Locust
locust -f my_loucstfile.py --master
在每个 slave 中执行(192.168.0.14 替换为你 msater 的IP)
locust -f my_locustfile.py --slave --master-host=192.168.0.14
详见:
> locust --help
Usage: locust [options] [LocustClass [LocustClass2 ... ]] Options:
-h, --help show this help message and exit
-H HOST, --host=HOST Host to load test in the following format:
http://10.21.32.33
--web-host=WEB_HOST Host to bind the web interface to. Defaults to '' (all
interfaces)
-P PORT, --port=PORT, --web-port=PORT
Port on which to run web host
-f LOCUSTFILE, --locustfile=LOCUSTFILE
Python module file to import, e.g. '../other.py'.
Default: locustfile
--csv=CSVFILEBASE, --csv-base-name=CSVFILEBASE
Store current request stats to files in CSV format.
--master Set locust to run in distributed mode with this
process as master
--slave Set locust to run in distributed mode with this
process as slave
--master-host=MASTER_HOST
Host or IP address of locust master for distributed
load testing. Only used when running with --slave.
Defaults to 127.0.0.1.
--master-port=MASTER_PORT
The port to connect to that is used by the locust
master for distributed load testing. Only used when
running with --slave. Defaults to 5557. Note that
slaves will also connect to the master node on this
port + 1.
--master-bind-host=MASTER_BIND_HOST
Interfaces (hostname, ip) that locust master should
bind to. Only used when running with --master.
Defaults to * (all available interfaces).
--master-bind-port=MASTER_BIND_PORT
Port that locust master should bind to. Only used when
running with --master. Defaults to 5557. Note that
Locust will also use this port + 1, so by default the
master node will bind to 5557 and 5558.
--expect-slaves=EXPECT_SLAVES
How many slaves master should expect to connect before
starting the test (only when --no-web used).
--no-web Disable the web interface, and instead start running
the test immediately. Requires -c and -r to be
specified.
-c NUM_CLIENTS, --clients=NUM_CLIENTS
Number of concurrent Locust users. Only used together
with --no-web
-r HATCH_RATE, --hatch-rate=HATCH_RATE
The rate per second in which clients are spawned. Only
used together with --no-web
-t RUN_TIME, --run-time=RUN_TIME
Stop after the specified amount of time, e.g. (300s,
20m, 3h, 1h30m, etc.). Only used together with --no-
web
-L LOGLEVEL, --loglevel=LOGLEVEL
Choose between DEBUG/INFO/WARNING/ERROR/CRITICAL.
Default is INFO.
--logfile=LOGFILE Path to log file. If not set, log will go to
stdout/stderr
--print-stats Print stats in the console
--only-summary Only print the summary stats
--no-reset-stats Do not reset statistics once hatching has been
completed
-l, --list Show list of possible locust classes and exit
--show-task-ratio print table of the locust classes' task execution
ratio
--show-task-ratio-json
print json data of the locust classes' task execution
ratio
-V, --version show program's version number and exit
locust启动命令的更多相关文章
- Mongodb启动命令mongod参数说明
Mongodb启动命令mongod参数说明 mongod的主要参数有: 基本配置 ----------------------------------------------------------- ...
- Mongod(5):启动命令mongod参数说明
Mongodb启动命令mongod参数说明(http://blog.csdn.net/fdipzone/article/details/7442162) mongod的主要参数有: 基本配置 ---- ...
- MongoDB笔记(三)启动命令mongod的参数
上一节有关访问权限的笔记,是由启动命令mongod的参数auth引发的有关问题,这节就来看看mongod的其他参数 MongoDB启动命令mongod参数说明: 基本配置 --quiet # 安静输出 ...
- [置顶] Java启动命令大观
Java启动命令是所有java应用程序的入口,通过它来启动Java运行时环境,并加载相关的class.不过由于IDE的盛行,我们Java程序员中的大多数的并不是非常的了解Java启动命令.本文希望做一 ...
- centos 下 apache 重启启动命令
apache 启动 usr/local/apache243/bin/apachectl start apache 重启 usr/local/apache243/bin/apachectl restar ...
- Java启动命令与Maven打包设置
一.Java启动命令 java程序的启动方式有三种: 1.java -jar 生成的jar包中,manifest文件定义了Main Class,可使用该命令 java -jar test.jar 2. ...
- svn 启动命令讲解
svn默认端口是3690 svn启动命令详解 svn启动命令详解 svnserve --help usage: svnserve [-d | -i | -t | -X] [options] Valid ...
- win7 php nginx 启动命令
1 php 启动命令 @echo off e: cd E:/php-/ echo "php is starting on port 9007, php_version is 7.0.6&qu ...
- Ubuntu 16.04设置rc.local开机启动命令/脚本的方法
Ubuntu 16.04设置rc.local开机启动命令/脚本的方法 Ubuntu 16.04设置rc.local开机启动命令/脚本的方法(通过update-rc.d管理Ubuntu开机启 ...
随机推荐
- 递归函数 Vue ElementUI
对树形菜单的递归操作,首先应该对树形菜单数据进行整理,优化成自己需要的类型 比如Vue + ElementUI的动态侧边栏数据 export function routerRoleToPretty ( ...
- idea (2018.09) 安装破解mybatis plugin
本来打算安装的是mybatis plugin最新版本(4.0.4) 但是安装下来发现lib目录中少mybatis_plugin.jar包 只有手动安装了这里安装的是2.9.2版本使用了一下不受影响 破 ...
- Go 初体验 - 闭包的几种情况
闭包: 闭包是可以包含自由(未绑定到特定对象)变量的代码块,这些变量不在这个代码块内或者任何全局上下文中定义,而是在定义代码块的环境中定义.要执行的代码块(由于自由变量包含在代码块中,所以这些自由变量 ...
- Objective-C RunTime 学习笔记 之 消息转发流程
1) 当向某个对象发送消息时,先从cache(cache_t)中查找方法对象(method_t),如果找到则进行回调:否则通过查找对象的类(元类)定义中方法列表,一直追溯到NSObject, 如果找到 ...
- OpenStack-Neutron-Fwaas-代码【一】
Kilo的代码中对Fwaas做了优化,可以将规则应用到单个路由上 但是juno里面还是应用到租户的所有路由上的,因此对juno的代码做了修改 1. 介绍 在FWaaS中,一个租户可以创建多个防火墙,而 ...
- RAID技术详解
RAID:Redundant Array of Independent Disks 中文我们称为独立冗余磁盘阵列.基本上是见名知意.RAID的基本思想就是将多个容量较小且价格实惠的磁盘进行组合起来构成 ...
- sitecore 获取item的URL
给出一个简单的sitecore项: Item item; 该项目本身不包含它的网址.要获取项目的URL,您需要调用static类Sitecore.Links.LinkManager string ur ...
- omitting directory `folder/'
题记:一个问题,若遇见第一次,不知道如何解决,经查资料后处理掉可以原谅:若遇见第二次,还是一头雾水!反省自己,特此备录. 在linux CentOS6.5 系统中复制文件夹时提示如下: cp: omi ...
- linux 运行级别 & 虚拟控制台
7 个运行级别 #-停机(千万不要把initdefault设置为0) #-单用户模式 #-多用户,没有NFS #-完全多用户模式(标准的运行级) #-没有用到 #-X11(xwindow) #-重新 ...
- 关于linux系统CPU篇--->不容易发现的占用CPU较高进程
1.系统的CPU使用率,不仅包括进程用户态和内核态的运行,还包括中断处理,等待IO以及内核线程等等.所以,当你发现系统的CPU使用率很高的时候,不一定能找到相对应的高CPU使用率的进程 2.案例分析, ...