{"id":20716769,"url":"https://github.com/ozeer/go-api","last_synced_at":"2025-03-11T07:23:55.594Z","repository":{"id":193640056,"uuid":"686946275","full_name":"ozeer/go-api","owner":"ozeer","description":"基于Gin封装的API框架","archived":false,"fork":false,"pushed_at":"2023-11-22T08:23:27.000Z","size":68292,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T22:12:06.613Z","etag":null,"topics":["api","cli","framework","gin","jwt","rabbitmq","redis","timer"],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozeer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-04T09:29:57.000Z","updated_at":"2023-12-18T15:09:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"9dd43f50-facc-4913-b52f-3426b35172f5","html_url":"https://github.com/ozeer/go-api","commit_stats":null,"previous_names":["ozeer/go-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozeer%2Fgo-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozeer%2Fgo-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozeer%2Fgo-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozeer%2Fgo-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozeer","download_url":"https://codeload.github.com/ozeer/go-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242989516,"owners_count":20217796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cli","framework","gin","jwt","rabbitmq","redis","timer"],"created_at":"2024-11-17T03:06:45.026Z","updated_at":"2025-03-11T07:23:55.557Z","avatar_url":"https://github.com/ozeer.png","language":"PLpgSQL","readme":"## 编译执行\n```\ngo build -o bin/server main.go\n./bin/server\n```\n\n## 性能分析\n### 一、CPU分析\n1、获取最近10秒程序运行的CPU profile，-seconds参数不填默认为30。\n```\ngo tool pprof -seconds 10 http://127.0.0.1:8888/debug/pprof/profile\n```\n2、运行编写好的请求服务的脚本\n```\ncd tests\ngo test -v -run TestRegister -timeout 7200s\n```\n3、可视化展示\n```\ngo tool pprof -http=:8081 ~/pprof/pprof.samples.cpu.001.pb.gz\n```\n### 二、内存分析\n1、获取程序运行的内存profile\n```\ngo tool pprof http://127.0.0.1:8888/debug/pprof/heap\n```\n2、可视化展示\n```\ngo tool pprof -http=:8081 ~/pprof/pprof.alloc_objects.alloc_space.inuse_objects.inuse_space.001.pb.gz\n```\n\n## 分布式唯一id\n- https://github.com/sony/sonyflake\n- https://sqids.org/?hashids","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozeer%2Fgo-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozeer%2Fgo-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozeer%2Fgo-api/lists"}