go-healthcheck

module
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2020 License: Apache-2.0

README

PProf

Build Status Go Report Card LICENSE Godoc

使用CircleCI进程CI Pipeline校验,Go Report Card进行Golang项目代码分析

  1. CircleCI: https://circleci.com/gh/chenguolin/gopprof/tree/master
  2. Go Report Card: https://goreportcard.com/report/github.com/chenguolin/gopprof

golang 应用性能分析 SDK,默认提供以下接口,内部会启动一个HTTP Server端口默认使用38888

  1. /debug/health 健康检查接口
  2. /debug/pprof/allocs
  3. /debug/pprof/block
  4. /debug/pprof/cmdline
  5. /debug/pprof/goroutine
  6. /debug/pprof/heap
  7. /debug/pprof/mutex
  8. /debug/pprof/profile
  9. /debug/pprof/threadcreate
  10. /debug/pprof/trace

Usage

  1. import "github.com/chenguolin/gopprof/pprof"
  2. 调用 pprof.RegisterPProf()

CI Workflow Check

  1. gocyclo: 校验代码复杂度
  2. gofmt: 校验代码是否都已经格式化
  3. golint: 校验代码风格规范是否按照指定标准
  4. gosimple: 校验代码是否可以简化
  5. govet: 代码静态校验
  6. misspell: 校验是否有英文单词拼写错误
  7. unused: 校验是否有未使用变量、常量、函数、结构体等
  8. gotest: 单元测试校验

Gitlab CI

如果使用Gitlab,也可以通过.gitlab-ci.yml运行Gitlab CI Pipeline,详细介绍请参考下面2篇文章

  1. Gitlab 安装使用
  2. Gitlab CI和CD配置

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL