首页 文章 精选 留言 我的

精选列表

搜索[系统工具],共10000篇文章
优秀的个人博客,低调大师

TLv8 IDE v2.4.3 已经发布,基于 Eclipse 的快速开发工具

TLv8 IDE v2.4.3 已经发布,此版本更新内容包括: 1、Studio透视图默认展示项目资源管理器和包资源管理器; 2、放弃自定义资源视图,直接使用项目资源管理器; 3、补充源码说明; 4、表编辑器增加编辑默认值功能; 5、优化功能树编辑器:添加layui图标属性编辑; 6、解决win10及以下版本无法运行cef的问题(报表编辑器)。 --------------------一些已知bug-------------------

优秀的个人博客,低调大师

堪比JMeter的.Net压测工具 - Crank 进阶篇 - 认识yml

1. 前言 入门篇我们已经成功运行hello.benchmarks.yml并输出测试结果,本篇我们就hello.benchmarks.yml、以及运行的shell脚本详细解读下其中的含义 2. 剖析hello.benchmarks.yml 2.1. job 在hello.benchmarks.yml中我们定义了一个新的job: server,并指定了仓库信息 ( 远程仓库 ): repository:https://github.com/doddgu/crank.git # 仓库源 branchOrCommit:sample # 分支 project: samples/hello/hello.csproj # 项目 并通过import导入了bombardier.yml,其中定义了另外一个job: bombardier,并指定了仓库信息 ( 远程仓库 ): repository: https://github.com/doddgu/crank.git branchOrCommit: sample project: src/Microsoft.Crank.Jobs.Bombardier/Microsoft.Crank.Jobs.Bombardier.csproj sourceKey: bombardier # 服务器使用它来重用相同的源文件夹。 noBuild: true # 定义 SourceKey时,指示是否仍应进行构建 2.2. scenarios 在hello.benchmarks.yml中我们定义了场景: hello,并为此场景指定了两个任务: 第一个任务名为application,使用的是项目server 第二个任务名为load,并指定使用项目bombardier 2.3. variables 变量 在bombardier.yml中 定义了全局变量: headers、presetHeaders(预设header) 定义了局部变量: connections、warmup、duration、requests、rate、transport、serverScheme等等 在hello.benchmarks.yml中为load定义了局部变量serverPort、path 2.4. profiles 配置 在hello.benchmarks.yml中我们 定义了配置local 并指定了局部变量: serverAddress = localhost 为任务application、load指定了部署作业的endpoint 是 http://localhost:5010 (指定执行任务的Agent地址) 2.5. arguments 参数 在bombardier.yml中与variables同级的配置: arguments,此参数是在启动job后传递的参数,其中定义的全局参数、局部参数信息也都是为构建完整的参数做准备,bombardier真实的参数信息是: -c {{connections}} -w {{warmup}} -d {{duration}} -n {{requests}} --insecure -l {% if rate != 0 %} --rate {{ rate }} {% endif %} {% if transport %} --{{ transport}} {% endif %} {{headers[presetHeaders]}} {% for h in customHeaders %}{% assign s = h | split : ':' %}--header \"{{ s[0] }}: {{ s[1] | strip }}\" {% endfor %} {% if serverUri == blank or serverUri == empty %} {{serverScheme}}://{{serverAddress}}:{{serverPort}}{{path}} {% else %} {{serverUri}}:{{serverPort}}{{path}} {% endif %} {% if bodyFile != blank and bodyFile != empty %} -f {{bodyFile}} {% endif %} {% if verb != blank and verb != empty %} -m {{verb}} {% endif %} 3. 改造hello.benchmarks.yml 改造hello.benchmarks.yml,不考虑重用,最原始的代码如下 variables: headers: none: '' plaintext: '--header "Accept: text/plain,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7" --header "Connection: keep-alive"' html: '--header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" --header "Connection: keep-alive"' json: '--header "Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7" --header "Connection: keep-alive"' connectionclose: '--header "Connection: close"' presetHeaders: none jobs: bombardier: source: repository: https://github.com/dotnet/crank.git branchOrCommit: main project: src/Microsoft.Crank.Jobs.Bombardier/Microsoft.Crank.Jobs.Bombardier.csproj sourceKey: bombardier noBuild: true readyStateText: Bombardier Client waitForExit: true variables: connections: 256 warmup: 15 duration: 15 requests: 0 rate: 0 transport: fasthttp # | http1 | http2 serverScheme: http serverAddress: localhost serverPort: 5000 path: bodyFile: # path or url for a file to use as the body content verb: # GET when nothing is specified customHeaders: [ ] # list of headers with the format: '<name1>: <value1>', e.g. [ 'content-type: application/json' ] arguments: "-c {{connections}} -w {{warmup}} -d {{duration}} -n {{requests}} --insecure -l {% if rate != 0 %} --rate {{ rate }} {% endif %} {% if transport %} --{{ transport}} {% endif %} {{headers[presetHeaders]}} {% for h in customHeaders %}{% assign s = h | split : ':' %}--header \"{{ s[0] }}: {{ s[1] | strip }}\" {% endfor %} {% if serverUri == blank or serverUri == empty %} {{serverScheme}}://{{serverAddress}}:{{serverPort}}{{path}} {% else %} {{serverUri}}:{{serverPort}}{{path}} {% endif %} {% if bodyFile != blank and bodyFile != empty %} -f {{bodyFile}} {% endif %} {% if verb != blank and verb != empty %} -m {{verb}} {% endif %}" onConfigure: # - job.timeout = Number(job.variables.duration) + Number(job.variables.warmup) + 10; endpoints: - http://localhost:5010 server: source: repository: https://github.com/doddgu/crank branchOrCommit: sample project: samples/hello/hello.csproj readyStateText: Application started. endpoints: - http://localhost:5010 scenarios: hello: application: job: server load: job: bombardier variables: serverPort: 5000 path: / 4. 解读crank shell 之前我们通过shell执行: crank --config hello.benchmarks.yml --scenario hello --profile local --load.framework net5.0 --application.framework net5.0 其中crank 是固定的、代表:Crank Controller --config:固定的配置,指执行哪个yml配置,每次仅能指定一个yml配置 --scenario:固定的配置,设置场景是hello --profile:固定的配置,非必选,可多次设置,指定当前Crank命令申请的配置是local,使用local下配置的所有信息 --load.framework: 格式:<任务名>.framework,为任务load指定framework的运行框架版本是net5.0、--application.framework同理 改造hello.benchmarks.yml,因为移除了profile,所以执行: crank --config hello.yml --scenario hello --load.framework net5.0 --application.framework net5.0 即可 查看crank更多文档 5. 疑问 为什么启动crank时要增加--application.framework net5.0? 安装crank要求必须有net5.0的环境,所以指定net5.0不需要再单独安装框架环境 为什么启动crank时不指定framework时默认是netcore3.1呢? 使用记事本打开hello.csproj、Microsoft.Crank.Jobs.Bombardier.csproj 即可了解 scenarios节点下application以及load两个节点名称可以更换吗?只能有两个节点? 节点名称不固定,可以更换,也没有限制必须是两个节点,具体多少个节点根据自己的需要来 6. 结尾 通过上面的学习,我们也已经完全的了解了各配置的作用,但对bombardier.yml与开源项目bombardier存在什么样的联系还不清楚,以及为什么叫做bombardier.yml而不是其他名字,并且是如何实现性能指标的输出,接下来就会讲到bombardier.yml与开源项目bombardier的关系,以及wrk.yml与wrk的关系 源码地址:https://github.com/doddgu/crank/tree/sample 开源地址 MASA.BuildingBlocks:https://github.com/masastack/MASA.BuildingBlocks MASA.Contrib:https://github.com/masastack/MASA.Contrib MASA.Utils:https://github.com/masastack/MASA.Utils MASA.EShop:https://github.com/masalabs/MASA.EShop MASA.Blazor:https://github.com/BlazorComponent/MASA.Blazor 如果你对我们的 MASA Framework 感兴趣,无论是代码贡献、使用、提 Issue,欢迎联系我们

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册