{"id":15324137,"url":"https://github.com/dxvgef/tsing-benchmark","last_synced_at":"2026-05-19T14:09:05.446Z","repository":{"id":144231485,"uuid":"227279626","full_name":"dxvgef/tsing-benchmark","owner":"dxvgef","description":"tsing,echo,gin,chi等框架的基准测试代码","archived":false,"fork":false,"pushed_at":"2025-02-05T22:35:54.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T05:42:11.028Z","etag":null,"topics":["benchmark","chi","echo","framework","gin","httprouter","tsing","web"],"latest_commit_sha":null,"homepage":"","language":"Go","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/dxvgef.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-12-11T04:54:47.000Z","updated_at":"2025-02-05T22:35:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"a7686748-36b7-4ac2-a6c6-b8d59d629670","html_url":"https://github.com/dxvgef/tsing-benchmark","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.038461538461538436","last_synced_commit":"913d8e9c00c711db4b2599319e4b1ddb44484859"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dxvgef/tsing-benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxvgef%2Ftsing-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxvgef%2Ftsing-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxvgef%2Ftsing-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxvgef%2Ftsing-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dxvgef","download_url":"https://codeload.github.com/dxvgef/tsing-benchmark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxvgef%2Ftsing-benchmark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33219487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T07:54:09.561Z","status":"ssl_error","status_checked_at":"2026-05-19T07:54:08.508Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["benchmark","chi","echo","framework","gin","httprouter","tsing","web"],"created_at":"2024-10-01T09:24:36.942Z","updated_at":"2026-05-19T14:09:05.424Z","avatar_url":"https://github.com/dxvgef.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tsing-benchmark\n包含以下框架的路由基准测试\n- github.com/dimfeld/httptreemux/v5\n- github.com/dxvgef/tsing\n- github.com/dxvgef/tsing/v2\n- github.com/gin-gonic/gin\n- github.com/julienschmidt/httprouter\n- github.com/labstack/echo/v4\n\n同时测试了启用和禁用`recover`的两种情况\n\n#### 测试方法：\n```\ngo test -bench=. -benchmem\n```\n\n## 测试结果\n```\nBenchmark_TsingV2-8                        54105             22044 ns/op               0 B/op          0 allocs/op\nBenchmark_TsingV2_Recover-8                52628             22598 ns/op               0 B/op          0 allocs/op\nBenchmark_TsingV1-8                        49255             24296 ns/op               0 B/op          0 allocs/op\nBenchmark_TsingV1_Recover-8                46572             25695 ns/op               0 B/op          0 allocs/op\nBenchmark_Httprouter-8                     49857             24132 ns/op           13792 B/op        167 allocs/op\nBenchmark_Httprouter_Recover-8             47798             25204 ns/op           13792 B/op        167 allocs/op\nBenchmark_Gin-8                            47607             25081 ns/op               0 B/op          0 allocs/op\nBenchmark_Gin_Recover-8                    44802             26734 ns/op               0 B/op          0 allocs/op\nBenchmark_Echo-8                           40962             29229 ns/op               0 B/op          0 allocs/op\nBenchmark_Echo_Recover-8                   28910             41223 ns/op           12998 B/op        203 allocs/op\nBenchmark_HTTPTreemux-8                    15152             78979 ns/op           65857 B/op        671 allocs/op\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdxvgef%2Ftsing-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdxvgef%2Ftsing-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdxvgef%2Ftsing-benchmark/lists"}