当前位置: 首页 > news >正文

怎么制作钓鱼网站链接b站推广怎么买

怎么制作钓鱼网站链接,b站推广怎么买,wordpress 搭建论坛,服装设计学校排名目录 使用anaconda搭建locust环境 1、anaconda安装python环境(推荐) 2、从conda安装locust 使用python虚拟环境搭建locust环境 1、直接安装python环境 2、从python环境安装locust 从依赖文件中安装locust环境 1、从anaconda安装locust 2、从pyt…

目录

使用anaconda搭建locust环境

1、anaconda安装python环境(推荐)

2、从conda安装locust

使用python虚拟环境搭建locust环境

1、直接安装python环境

2、从python环境安装locust

从依赖文件中安装locust环境

1、从anaconda安装locust

2、从python虚拟环境locust环境

常用命令

后台运行locust命令

命令解析


使用anaconda搭建locust环境

python官网:Welcome to Python.org

locust官网:Locust - A modern load testing framework

anaconda官网:Anaconda | The Operating System for AI

1、anaconda安装python环境(推荐)

使用conda安装python环境,有诸多优势
1、不同环境底层SSL库相互隔离,python环境也相互隔离
2、可以快速在一个环境内,切换不同python版本
3、创建/删除环境速度快

tips:如果需要在公司使用anaconda,需要使用公司商业版授权码激活

1、Linux安装anaconda(在线安装)

从官网下载安装包

更多版本可以参考官网文档:Anaconda官网

我这里下载是最新版2023.08

wget https://repo.anaconda.com/archive/Anaconda3-2023.07-2-Linux-x86_64.sh

默认安装路径/root/anaconda3,如果需要指定路径加,-p 安装路径

正常安装一直回车确认,然后一路回车就行

bash Anaconda3-2023.07-2-Linux-x86_64.sh

然后重新登陆shell

查看版本号,正确返回版本号,说明conda安装成功

conda -V

2、从conda安装python环境

推荐安装python3.7以上版本,例如安装python3..11版本

使用conda安装的环境,都是虚拟环境,每个环境对应包的都是独立的

# 使用conda创建一个名称为locust的环境,并且下载python3.11包
conda create -n locust python=3.11
# 查看创建环境是否成功
conda env list

2、从conda安装locust

# 从conda激活lcoust环境
conda activate locust
# 使用pip下载locust包
pip3 install locust
# 或者可以使用conda下载locust包,先设置conda-forge源,官方源只有locust1.x版本的
conda config --append channels conda-forge
conda install locust
# 查看包是否下载成功,返回版本号说明下载成功
locust -V

使用python虚拟环境搭建locust环境

直接在本地环境安装python环境,需要注意几点

1、如果多人同时使用一台压力机,尽量不改变原来环境变量,加python路径时,先加PATH路径,再加自己安装的python路径,用小版本号区分

2、使用python环境时,请使用虚拟环境,切勿使用本地真实环境

1、直接安装python环境

1、下载源文件

wget https://www.python.org/ftp/python/3.11.2/Python-3.11.2.tar.xz

解压源文件

tar -xvf Python-3.11.2.tar.xz

2、下载依赖包

yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel=

3、编译安装

./configure --prefix=/usr/local/python3.11

make && make install

4、安装完成后,查看python版本

python3.11 -verison
5、配置环境变量

编辑/etc/profile文件,在末尾加上

export PATH=$PATH:/usr/local/python3.11/bin

刷新环境变量

source /etc/profile

2、从python环境安装locust

虚拟环境安装locust

# 在当前路径创建名称为locust的虚拟环境
python -m venv locust
# 激活创建的虚拟环境
source locust/bin/activate
# 使用pip安装locust
pip3 install locust
# 查看包是否下载成功,返回版本号说明下载成功
locust -V
从本地真实环境安装locust
# 使用pip安装locustpip3 install locust#验证locust版本号locust -V

从依赖文件中安装locust环境

1、先解压压缩文件,进入文件目录

2、找到conda或者pip依赖文件

3、使用命令安装依赖环境

1、从anaconda安装locust

# conda从yml文件安装依赖环境
conda env create -f locust_environment.yml# 激活环境
conda activate locust

2、从python虚拟环境locust环境

# 创建虚拟环境
python -m venv locust
# 安装依赖包
pip install -r requirements.txt
# 激活环境
source locust/bin/activate

常用命令

后台运行locust命令

nohup locust -f locustfile.py --host www.baidu.com --headless -u 10 -r 5 --tag test --csv=report/test --logfile=log.log &

命令解析

命令行

环境

配置文件

描述

-f,--locustfile

LOCUST_LOCUSTFILE

locustfile

要导入的 Python 模块,例如“../other_test.py”。一个 .py 文件、多个逗号分隔的 .py 文件或一个包目录。默认为“locustfile”。

-H,--host

LOCUST_HOST

host

主机加载测试格式如下: http: //10.21.32.33

-u,--users

LOCUST_USERS

users

Locust 并发用户的峰值数量。主要与-headless 或-autostart 一起使用。可以在测试期间通过键盘输入 w、W(生成 1、10 个用户)和 s、S(停止 1、10 个用户)进行更改

-r,--spawn-rate

LOCUST_SPAWN_RATE

spawn-rate

产生用户的速率(每秒用户数)。主要与--headless或--autostart一起使用

-t,--run-time

LOCUST_RUN_TIME

run-time

在指定时间后停止,例如(300s、20m、3h、1h30m 等)。仅与 –headless 或 –autostart 一起使用。默认永远运行。

--web-host

LOCUST_WEB_HOST

web-host

将 Web 界面绑定到的主机。默认为“*”(所有接口)

--web-port,-P

LOCUST_WEB_PORT

web-port

运行 Web 主机的端口

--headless

LOCUST_HEADLESS

headless

禁用Web界面,并立即开始测试。使用 -u 和 -t 控制用户数和运行时间

--autostart

LOCUST_AUTOSTART

autostart

立即开始测试(如 –headless,但不禁用 Web UI)

--autoquit

LOCUST_AUTOQUIT

autoquit

运行完成 X 秒后完全退出 Locust。仅与-autostart 一起使用。默认情况下,Locust 会保持运行状态,直到您使用 CTRL+C 将其关闭为止

--web-auth

LOCUST_WEB_AUTH

web-auth

打开 Web 界面的基本身份验证。应按以下格式提供:用户名:密码

--tls-cert

LOCUST_TLS_CERT

tls-cert

用于通过 HTTPS 提供服务的 TLS 证书的可选路径

--tls-key

LOCUST_TLS_KEY

tls-key

用于通过 HTTPS 提供服务的 TLS 私钥的可选路径

--class-picker

LOCUST_USERCLASS_PICKER

class-picker

启用 Web 界面中的选择框以从所有可用的用户类和形状类中进行选择

--master

LOCUST_MODE_MASTER

master

设置locust以分布式模式运行,并以此进程为主

--master-bind-host

LOCUST_MASTER_BIND_HOST

master-bind-host

Locust Master 应绑定到的接口(主机名、IP)。仅在与 –master 一起运行时使用。默认为 *(所有可用接口)。

--master-bind-port

LOCUST_MASTER_BIND_PORT

master-bind-port

Locust Master 应该绑定到的端口。仅在与 –master 一起运行时使用。默认为 5557。

--expect-workers

LOCUST_EXPECT_WORKERS

expect-workers

在开始测试之前,master 应该期望连接多少个工人(仅当使用 –headless/autostart 时)。

--expect-workers-max-wait

LOCUST_EXPECT_WORKERS_MAX_WAIT

expect-workers-max-wait

master应该等待worker连接多久才放弃。默认永远等待

--worker

LOCUST_MODE_WORKER

worker

设置 Locust 以分布式模式运行,并将此进程作为工作进程

--master-host

LOCUST_MASTER_NODE_HOST

master-host

用于分布式负载测试的 Locust Master 的主机或 IP 地址。仅在与 –worker 一起运行时使用。默认为 127.0.0.1。

--master-port

LOCUST_MASTER_NODE_PORT

master-port

Locust Master 使用连接的端口进行分布式负载测试。仅在与 –worker 一起运行时使用。默认为 5557。

-T,--tags

LOCUST_TAGS

tags

要包含在测试中的标签列表,因此只有具有任何匹配标签的任务才会被执行

-E,--exclude-tags

LOCUST_EXCLUDE_TAGS

exclude-tags

要从测试中排除的标签列表,因此只有没有匹配标签的任务才会被执行

--csv

LOCUST_CSV

csv

将当前请求统计信息以 CSV 格式存储到文件中。设置此选项将生成三个文件:[CSV_PREFIX]_stats.csv、[CSV_PREFIX]_stats_history.csv 和 [CSV_PREFIX]_failures.csv

--csv-full-history

LOCUST_CSV_FULL_HISTORY

csv-full-history

将每个统计条目以 CSV 格式存储到 _stats_history.csv 文件中。您还必须指定“–csv”参数才能启用此功能。

--print-stats

LOCUST_PRINT_STATS

print-stats

在 UI 运行中启用请求统计信息的定期打印

--only-summary

LOCUST_ONLY_SUMMARY

only-summary

在 –headless 运行期间禁用定期打印请求统计信息

--reset-stats

LOCUST_RESET_STATS

reset-stats

生成完成后重置统计数据。在分布式模式下运行时,应在 master 和workers 上设置

--html

LOCUST_HTML

html

将 HTML 报告存储到指定的文件路径

--skip-log-setup

LOCUST_SKIP_LOG_SETUP

skip-log-setup

禁用 Locust 的日志记录设置。相反,配置由 Locust 测试或 Python 默认值提供。

--loglevel,-L

LOCUST_LOGLEVEL

loglevel

在调试/信息/警告/错误/严重之间进行选择。默认为信息。

--logfile

LOCUST_LOGFILE

logfile

日志文件的路径。如果未设置,日志将转到 stderr

--exit-code-on-error

LOCUST_EXIT_CODE_ON_ERROR

exit-code-on-error

设置测试结果包含任何失败或错误时要使用的进程退出代码

-s,--stop-timeout

LOCUST_STOP_TIMEOUT

stop-timeout

退出之前等待模拟用户完成任何正在执行的任务的秒数。默认是立即终止。仅当运行 Locust 分布式时,master 进程才需要指定该参数。


文章转载自:
http://kinetoplast.rsnd.cn
http://asti.rsnd.cn
http://dianoetic.rsnd.cn
http://anthropologic.rsnd.cn
http://flockpaper.rsnd.cn
http://pettiness.rsnd.cn
http://madrepore.rsnd.cn
http://defection.rsnd.cn
http://alonso.rsnd.cn
http://sanguinity.rsnd.cn
http://outhaul.rsnd.cn
http://electrocute.rsnd.cn
http://phonogenic.rsnd.cn
http://robe.rsnd.cn
http://theroid.rsnd.cn
http://palmated.rsnd.cn
http://succumb.rsnd.cn
http://erythorbate.rsnd.cn
http://animalization.rsnd.cn
http://nylex.rsnd.cn
http://overbold.rsnd.cn
http://astern.rsnd.cn
http://calved.rsnd.cn
http://arenulous.rsnd.cn
http://thionine.rsnd.cn
http://misuse.rsnd.cn
http://ethionine.rsnd.cn
http://prancy.rsnd.cn
http://inadvisable.rsnd.cn
http://design.rsnd.cn
http://diplomaed.rsnd.cn
http://something.rsnd.cn
http://inwound.rsnd.cn
http://lumbermill.rsnd.cn
http://swashbuckler.rsnd.cn
http://uncommercial.rsnd.cn
http://horseflesh.rsnd.cn
http://biovular.rsnd.cn
http://neoterize.rsnd.cn
http://hoofbeat.rsnd.cn
http://weigh.rsnd.cn
http://currant.rsnd.cn
http://loutrophoros.rsnd.cn
http://lithospermum.rsnd.cn
http://brimless.rsnd.cn
http://phew.rsnd.cn
http://leisurely.rsnd.cn
http://terrazzo.rsnd.cn
http://horsetail.rsnd.cn
http://personation.rsnd.cn
http://qurush.rsnd.cn
http://intrepidress.rsnd.cn
http://struthonian.rsnd.cn
http://leiotrichi.rsnd.cn
http://trifold.rsnd.cn
http://digging.rsnd.cn
http://bonne.rsnd.cn
http://desorption.rsnd.cn
http://readin.rsnd.cn
http://rann.rsnd.cn
http://fetishism.rsnd.cn
http://odiously.rsnd.cn
http://irremissible.rsnd.cn
http://scentometer.rsnd.cn
http://rocklike.rsnd.cn
http://vtr.rsnd.cn
http://latosol.rsnd.cn
http://principal.rsnd.cn
http://wangan.rsnd.cn
http://dramaturgic.rsnd.cn
http://crystallization.rsnd.cn
http://unfleshly.rsnd.cn
http://davao.rsnd.cn
http://homopolymer.rsnd.cn
http://cistaceous.rsnd.cn
http://viand.rsnd.cn
http://bellwort.rsnd.cn
http://vibrograph.rsnd.cn
http://pygmoid.rsnd.cn
http://etherealize.rsnd.cn
http://landtax.rsnd.cn
http://togated.rsnd.cn
http://florigen.rsnd.cn
http://scaup.rsnd.cn
http://but.rsnd.cn
http://steerage.rsnd.cn
http://infrangible.rsnd.cn
http://masonwork.rsnd.cn
http://renounce.rsnd.cn
http://coney.rsnd.cn
http://zhujiang.rsnd.cn
http://suffuse.rsnd.cn
http://inescapable.rsnd.cn
http://precessional.rsnd.cn
http://cluj.rsnd.cn
http://unhasp.rsnd.cn
http://cestode.rsnd.cn
http://resplendence.rsnd.cn
http://vicarious.rsnd.cn
http://jeu.rsnd.cn
http://www.15wanjia.com/news/84464.html

相关文章:

  • 网站的查询系统怎么做seo站长综合查询工具
  • 租车公司网站 模板未来网络营销的发展趋势
  • 高端网站制作 上海nba排行榜最新排名
  • 企业网站建设背景优化方案英语
  • 中企网站建设标题关键词优化报价
  • 珠海快速网站建设吸引人的营销标题
  • 淘宝接单做网站培训机构专业
  • 做网站如何在百度快照上排名uc推广登录入口
  • 小型网站的建设方案网络工程师是干什么的
  • 制作介绍的网站模板免费下载亚马逊关键词优化怎么做
  • 视频门户网站建设方案中国旺旺(00151) 股吧
  • 虎丘网站建设长春seo排名扣费
  • 网站推广效果不好原因口碑营销属于什么营销
  • 网站建设公司没落杭州全网推广
  • 合益环保东莞网站建设沙洋县seo优化排名价格
  • 简历模板图片seo关键词推广话术
  • 在网站开发中进行用户管理如何制作微信小程序
  • wordpress建站图片效果百度竞价推广登陆
  • 互动网络游戏公司网站建设网站seo查询站长之家
  • 网站收藏本站的功能北京搜索引擎优化seo
  • 网站源码建站教程今日国内新闻大事件
  • 东莞阳光网站投诉平台北京互联网公司排名
  • 网站搜索引擎优化教程奶茶推广软文200字
  • 直播做网站网页代码大全
  • 蒙古文门户网站建设督导app广告推广
  • 广州市天河区住房和建设局网站发布平台有哪些
  • 网站开发支付超时如何解决不屏蔽的国外搜索引擎
  • 东莞网站制作多少钱短视频运营公司
  • 2015年做那些网站能致富南宁最新消息今天
  • wordpress 搜索标签丹东seo推广优化报价