[性能测试]Python性能测试 2021-10-23 12:26 455阅读 0赞 环境:Linux 以下几个工具都是基于FlameGraph ([http://www.brendangregg.com/flamegraphs.html][http_www.brendangregg.com_flamegraphs.html])来展开的。 ## 首先安装python-flamegraph ## [https://github.com/evanhempel/python-flamegraph][https_github.com_evanhempel_python-flamegraph] pip/ pip3 install git+https://github.com/evanhempel/python-flamegraph.git cd pyflame ./autogen.sh ./configure 此时运行make命令会出现提示: Making all in src make[1]: Entering directory `/root/pyflame/src' make all-am make[2]: Entering directory `/root/pyflame/src' make[2]: Leaving directory `/root/pyflame/src' make[1]: Leaving directory `/root/pyflame/src' make[1]: Entering directory `/root/pyflame' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/root/pyflame' 不用管它。 继续运行: make check 会提示以下 Making check in src make[1]: Entering directory `/root/pyflame/src' make[1]: Leaving directory `/root/pyflame/src' make[1]: Entering directory `/root/pyflame' make[1]: Nothing to be done for `check-am'. make[1]: Leaving directory `/root/pyflame' ./runtests.sh -v make: *** [check] Error 1 继续不用管 运行 make install 提示: Making install in src make[1]: Entering directory `/root/pyflame/src' make[2]: Entering directory `/root/pyflame/src' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../libtool --mode=install /usr/bin/install -c pyflame '/usr/local/bin' libtool: install: /usr/bin/install -c pyflame /usr/local/bin/pyflame make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/root/pyflame/src' make[1]: Leaving directory `/root/pyflame/src' make[1]: Entering directory `/root/pyflame' make[2]: Entering directory `/root/pyflame' make[2]: Nothing to be done for `install-exec-am'. /usr/bin/mkdir -p '/usr/local/share/man/man1' /usr/bin/install -c -m 644 'docs/pyflame.man' '/usr/local/share/man/man1/pyflame.1' make[2]: Leaving directory `/root/pyflame' make[1]: Leaving directory `/root/pyflame' 此时要注意了: 此时运行提示里的: /usr/bin/mkdir -p '/usr/local/bin' /usr/bin/install -c pyflame /usr/local/bin/pyflame 即可安装成功 运行以下命令如果有输出即安装成功 pyflame -t python -c 'print(sum(i for i in range(100000)))' 4999950000 ## 接下来安装FlameGraph ## wget https://github.com/brendangregg/FlameGraph/archive/master.zip unzip master.zip mv FlameGraph-master/ /opt/FlameGraph export PATH=$PATH:/opt/FlameGraph cd /opt/FlameGraph cp flamegraph.pl /usr/local/bin flamegraph.pl -h 如果有以下输出,则安装成功 Option h is ambiguous (hash, height, help) USAGE: /usr/local/bin/flamegraph.pl [options] infile > outfile.svg --title TEXT # change title text --subtitle TEXT # second level title (optional) --width NUM # width of image (default 1200) --height NUM # height of each frame (default 16) --minwidth NUM # omit smaller functions (default 0.1 pixels) --fonttype FONT # font type (default "Verdana") --fontsize NUM # font size (default 12) --countname TEXT # count type label (default "samples") --nametype TEXT # name type label (default "Function:") --colors PALETTE # set color palette. choices are: hot (default), mem, # io, wakeup, chain, java, js, perl, red, green, blue, # aqua, yellow, purple, orange .... [http_www.brendangregg.com_flamegraphs.html]: http://www.brendangregg.com/flamegraphs.html [https_github.com_evanhempel_python-flamegraph]: https://github.com/evanhempel/python-flamegraph
相关 [性能测试]Python性能测试 环境:Linux 以下几个工具都是基于FlameGraph ([http://www.brendangregg.com/flamegraphs.html][http_www 墨蓝/ 2021年10月23日 12:26/ 0 赞/ 456 阅读
相关 性能测试 一、性能测试前期准备工作 1、服务器的系统是什么? 2、服务器的IP地址是多少? 3、服务器的配置如何? 4、本机的配置如何? 5、是否有足够的测试机? 6、性 ゝ一纸荒年。/ 2021年12月18日 08:07/ 0 赞/ 274 阅读
相关 【性能测试】性能测试的基础理论 转发自博客园贺满:https://www.cnblogs.com/puresoul/p/5456855.html ,有删减。 随着软件行业的快速发展,现代的软件系统越来越复 冷不防/ 2022年03月08日 07:44/ 0 赞/ 272 阅读
相关 【性能测试】性能测试工具选择 转发自博客园贺满:https://www.cnblogs.com/puresoul/p/5503134.html,有删减。 本篇文章主要简单总结下性能测试工具的原理以及如何 亦凉/ 2022年03月08日 08:54/ 0 赞/ 385 阅读
相关 python:性能测试-locust 前言 既然是测试开发,就肯定要写代码才行啊。loadrunner,robot framework都是写配置文件啊。 物理环境安装locust,pip3 install l 太过爱你忘了你带给我的痛/ 2022年03月10日 00:40/ 0 赞/ 191 阅读
相关 性能测试 今天对刚做的系统做了压力测试:64位的全量数据cache系统 cache server是部门的一个老系统,内存分配回收算法不是很好,进行了改造 改造之后,每秒可以导入50w Love The Way You Lie/ 2022年08月24日 06:10/ 0 赞/ 145 阅读
相关 Python+Locust性能测试 Python+Locust性能测试 1、设置断言监控接口请求成功和失败,一定要再请求接口的时候添加catch\_response=True这个参数,locust会通过自定 向右看齐/ 2022年11月06日 07:53/ 0 赞/ 141 阅读
相关 性能测试 不得不佩服西方软件项目管理对性能测试的工作分解的细致程度,相比看到我手下对性能测试的评估,感觉差了不是一丁点,到了我这个年龄,管理一个部门,没必要非要自己会jmeter,学了也 ゝ一世哀愁。/ 2022年11月16日 15:19/ 0 赞/ 129 阅读
相关 性能测试基础---性能测试分类 性能测试(狭义) 性能测试方法是通过模拟生产运行的业务压力量和使用场景组合,测试系统的性能是否满足生产性能要求。通俗地说,这种方法就是要在特定的运行条件下验证系统的处理能 缺乏、安全感/ 2022年12月05日 00:45/ 0 赞/ 228 阅读
相关 性能测试—性能测试指标及Jmeter性能测试 1.jp@gc - Bytes Throughput Over Time:不同时间吞吐量(字节Bytes)展示(图表) 聚合报告里,Throughput是按请求个数来展示的, £神魔★判官ぃ/ 2022年12月05日 00:48/ 0 赞/ 84 阅读
还没有评论,来说两句吧...