Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ozeer/go-api
基于Gin封装的API框架
https://github.com/ozeer/go-api
api cli framework gin jwt rabbitmq redis timer
Last synced: about 1 month ago
JSON representation
基于Gin封装的API框架
- Host: GitHub
- URL: https://github.com/ozeer/go-api
- Owner: ozeer
- Created: 2023-09-04T09:29:57.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-22T08:23:27.000Z (about 1 year ago)
- Last Synced: 2024-11-14T14:44:03.348Z (about 1 month ago)
- Topics: api, cli, framework, gin, jwt, rabbitmq, redis, timer
- Language: PLpgSQL
- Homepage:
- Size: 65.1 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 编译执行
```
go build -o bin/server main.go
./bin/server
```## 性能分析
### 一、CPU分析
1、获取最近10秒程序运行的CPU profile,-seconds参数不填默认为30。
```
go tool pprof -seconds 10 http://127.0.0.1:8888/debug/pprof/profile
```
2、运行编写好的请求服务的脚本
```
cd tests
go test -v -run TestRegister -timeout 7200s
```
3、可视化展示
```
go tool pprof -http=:8081 ~/pprof/pprof.samples.cpu.001.pb.gz
```
### 二、内存分析
1、获取程序运行的内存profile
```
go tool pprof http://127.0.0.1:8888/debug/pprof/heap
```
2、可视化展示
```
go tool pprof -http=:8081 ~/pprof/pprof.alloc_objects.alloc_space.inuse_objects.inuse_space.001.pb.gz
```## 分布式唯一id
- https://github.com/sony/sonyflake
- https://sqids.org/?hashids