压测的时候,如果在应用包里加入runtime包,会对压测产生非常严重的干扰。

测试1:开启runtime包

[luwenwei@test-weishi01v ~]$ siege -c  --time=15s -q -f /tmp/SafeBizEngine.siege.

Lifting the server siege...      done.

Transactions:                  hits
Availability: 76.92 %
Elapsed time: 14.37 secs
Data transferred: 10.86 MB
Response time: 3.77 secs
Transaction rate: 21.57 trans/sec
Throughput: 0.76 MB/sec
Concurrency: 81.29
Successful transactions:
Failed transactions:
Longest transaction: 10.03
Shortest transaction: 0.02

测试2:把runtime包注释掉

[luwenwei@test-weishi01v ~]$ siege -c  --time=15s -q -f /tmp/SafeBizEngine.siege.

Lifting the server siege...      done.

Transactions:                 hits
Availability: 100.00 %
Elapsed time: 14.88 secs
Data transferred: 39.65 MB
Response time: 0.76 secs
Transaction rate: 76.41 trans/sec
Throughput: 2.66 MB/sec
Concurrency: 57.99
Successful transactions:
Failed transactions:
Longest transaction: 2.83
Shortest transaction: 0.16

实验1,2对比发现:引入runtime包后的错误率很高,从而影响压测的关键数据QPS。

Golang: pprof的更多相关文章

  1. Golang pprof heap profile is empty

    Q: When you use `go tool pprof` get heap data, profile is empty. A: The default sampling rate is 1 s ...

  2. Golang pprof详解

    go的pprof包 go中有pprof包来做代码的性能监控,在两个地方有包: net/http/pprof runtime/pprof 其实net/http/pprof中只是使用runtime/ppr ...

  3. golang pprof 内存分析

    use pprof to get application  memory  useage add code in your main funciton import ( "log" ...

  4. Golang程序性能分析

    前言 程序性能分析我相信是每个程序员都会遇到的问题,比如说一个程序的CPU为什么占用这么高?有没有优化的空间?又比如程序出现了内存泄漏如何排查等等.如果是C++程序会借助于Google pprof c ...

  5. 记一次golang的内存泄露

    程序功能 此程序的主要功能是将文件中数据导入到clickhouse数据库中. [问题描述] 服务器内存每隔一段时间会耗尽 [问题分析] 由于使用的是go语言开发的,所以采用了业界流行的工具pprof. ...

  6. 我是怎么一步步用go找出压测性能瓶颈

    欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由mariolu 发表于云+社区专栏 序言: ​ 笔者要在线上服务器load日志并且重放来测一些机器性能指标.模拟机器资源比较少,相对的 ...

  7. Go服务监控

    使用Golang可以开发出高性能的HTTP.GRPC服务.一般项目运行后,我们也需要监控服务的性能或者进行调试.除了打日志,还有没有其他可视化的方案呢?答案是有的. 本文将会介绍几种常用的监控方案. ...

  8. Linux下用火焰图进行性能分析【转】

    转自:https://blog.csdn.net/gatieme/article/details/78885908 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原 ...

  9. Go内置常用包

    strings 字符串函数 Contains(s, substr string) bool 字符串s是否包含字符串substr,包含返回true Split(s, sep string) []stri ...

随机推荐

  1. SSLPinning 延伸

    AFSecurityPolicy用于验证HTTPS请求的证书,先来看看HTTPS的原理和证书相关的几个问题. HTTPS HTTPS连接建立过程大致是,客户端和服务端建立一个连接,服务端返回一个证书, ...

  2. 动态的改变标签内的src属性

    <body> <ul> <li class='on'>1</li> <li>2</li> <li>3</li& ...

  3. android使用shape做selector按钮按下和弹起的动画

    平时效果:   按下效果: selector代码: <?xml version="1.0" encoding="utf-8"?> <selec ...

  4. android项目实战 --ListView 头部ViewPager广告轮询图效果

    看开源框架:https://github.com/tianshaojie/AndroidFine,里面有如下效果,特记录学习下,以后项目中用也好能够立刻想起来.   如上面所示,是常见项目中的图片轮训 ...

  5. Ubuntu系统上安装搜狗拼音输入法sogou

    1. 首先在百度搜索搜狗拼音输入法Linux就能看到它的官网:http://pinyin.sogou.com/linux/ 下载后直接安装.安装成功后在控制台输入 im-config 如果选中的是fc ...

  6. createElement创建

    定义和用法 createElement() 方法可创建元素节点. 此方法可返回一个 Element 对象. <script type="text/javascript"> ...

  7. C++ namespace功能总结

    案例背景:你写了一些代码,其中有一个函数名为xyz(),同时另一个可用库里也有一个同名的函数xyz(), 编译器没有办法知道你指的是哪个版本的xyz(). 解决办法:A namespace is de ...

  8. 实现简单的手写涂鸦板(demo源码)

    在一些软件系统中,需要用到手写涂鸦的功能,然后可以将涂鸦的结果保存为图片,并可以将"真迹"通过网络发送给对方.这种手写涂鸦功能是如何实现的了?最直接的,我们可以使用Windows提 ...

  9. PHP中使用CURL(二)

    https不需要进行ca认证和证书中域名认证 curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,false); curl_setopt($ch,CURLOPT_SSL_VE ...

  10. OC之消息调用过程

    Bird * aBird = [[Bird alloc] init]; [aBird fly]; 中对 fly 的调用,编译器通过插入一些代码,将之转换为对方法具体实现 IMP 的调用,这个 IMP ...