module
Version:
v1.0.9
Opens a new window with list of versions in this module.
Published: Feb 4, 2020
License: Apache-2.0
Opens a new window with license information.
README
¶
PProf
使用CircleCI
进程CI Pipeline校验,Go Report Card
进行Golang项目代码分析
- CircleCI: https://circleci.com/gh/chenguolin/gopprof/tree/master
- Go Report Card: https://goreportcard.com/report/github.com/chenguolin/gopprof
golang 应用性能分析 SDK,默认提供以下接口,内部会启动一个HTTP Server端口默认使用38888
- /debug/health 健康检查接口
- /debug/pprof/allocs
- /debug/pprof/block
- /debug/pprof/cmdline
- /debug/pprof/goroutine
- /debug/pprof/heap
- /debug/pprof/mutex
- /debug/pprof/profile
- /debug/pprof/threadcreate
- /debug/pprof/trace
Usage
- import "github.com/chenguolin/gopprof/pprof"
- 调用 pprof.RegisterPProf()
CI Workflow Check
gocyclo
: 校验代码复杂度
gofmt
: 校验代码是否都已经格式化
golint
: 校验代码风格规范是否按照指定标准
gosimple
: 校验代码是否可以简化
govet
: 代码静态校验
misspell
: 校验是否有英文单词拼写错误
unused
: 校验是否有未使用变量、常量、函数、结构体等
gotest
: 单元测试校验
Gitlab CI
如果使用Gitlab,也可以通过.gitlab-ci.yml
运行Gitlab CI Pipeline,详细介绍请参考下面2篇文章
- Gitlab 安装使用
- Gitlab CI和CD配置
Directories
¶
Click to show internal directories.
Click to hide internal directories.