Golang: pprof
压测的时候,如果在应用包里加入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的更多相关文章
- 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 ...
- Golang pprof详解
go的pprof包 go中有pprof包来做代码的性能监控,在两个地方有包: net/http/pprof runtime/pprof 其实net/http/pprof中只是使用runtime/ppr ...
- golang pprof 内存分析
use pprof to get application memory useage add code in your main funciton import ( "log" ...
- Golang程序性能分析
前言 程序性能分析我相信是每个程序员都会遇到的问题,比如说一个程序的CPU为什么占用这么高?有没有优化的空间?又比如程序出现了内存泄漏如何排查等等.如果是C++程序会借助于Google pprof c ...
- 记一次golang的内存泄露
程序功能 此程序的主要功能是将文件中数据导入到clickhouse数据库中. [问题描述] 服务器内存每隔一段时间会耗尽 [问题分析] 由于使用的是go语言开发的,所以采用了业界流行的工具pprof. ...
- 我是怎么一步步用go找出压测性能瓶颈
欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由mariolu 发表于云+社区专栏 序言: 笔者要在线上服务器load日志并且重放来测一些机器性能指标.模拟机器资源比较少,相对的 ...
- Go服务监控
使用Golang可以开发出高性能的HTTP.GRPC服务.一般项目运行后,我们也需要监控服务的性能或者进行调试.除了打日志,还有没有其他可视化的方案呢?答案是有的. 本文将会介绍几种常用的监控方案. ...
- Linux下用火焰图进行性能分析【转】
转自:https://blog.csdn.net/gatieme/article/details/78885908 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原 ...
- Go内置常用包
strings 字符串函数 Contains(s, substr string) bool 字符串s是否包含字符串substr,包含返回true Split(s, sep string) []stri ...
随机推荐
- C#常见数据格式导出
首先定义一个实体类 /// <summary> /// 用户实体类 /// </summary> public class User { /// <summary> ...
- angularjs表单中enter键提交
html页面: <form class="smart-form" id="checkout-form" searchinput> <div c ...
- python+selenium+Eclipse安装
1.安装python 参考安装python:http://www.cnblogs.com/beyongblue/p/4215740.html 2.安装python管理工具setuptools 3.安装 ...
- 在Eclipse中安装testNG插件
1. 选择菜单:Help->Install New Software,点击Add按钮输入框中输入相应的Name:testNG和Location:http://beust.com/eclipse. ...
- HDU 3127 WHUgirls
二维完全背包,理解似乎还不够全面,过几天回来再看看这题. #include<cstdio> #include<cstring> #include<cmath> #i ...
- 一般增广路方法求网络最大流(Ford-Fulkerson算法)
/* Time:2015-6-18 接触网络流好几天了 写的第一个模版————Ford-Fulkerson算法 作用:求解网络最大流 注意:源点是0 汇点是1 如果题目输入的是1到n 请预处理减1 * ...
- Linux常用使用技巧
一.如何实时查看linux下的日志 cat /var/log/*.log 如果日志在更新,如何实时查看 tail -f /var/log/messages 还可以使用 watch -d -n 1 ca ...
- HDU 1564 Play a game
Description New Year is Coming! ailyanlu is very happy today! and he is playing a chessboard game wi ...
- Linux中kettle启动spoon.sh遇到的问题
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAccAAAAYCAIAAAAAgaGrAAAE1klEQVR4nO1b2ZWrMAylLgpyPa7Gzb
- LeetCode OJ 209. Minimum Size Subarray Sum
Given an array of n positive integers and a positive integer s, find the minimal length of a subarra ...