mirror of
https://github.com/lukaszraczylo/go-telegram.git
synced 2026-06-05 22:43:59 +00:00
607c3e8ddd
Adds test/benchmarks/ as a separate Go module so competitor deps
(go-telegram-bot-api/v5, telebot.v3, go-telegram/bot, telego,
echotron/v3) stay out of the root go.mod.
Hot paths covered:
- Webhook decode (small Update -> typed Update struct)
- Large unmarshal (Update with entities + reply markup + photo array)
- API round-trip (sendMessage against httptest.Server)
- Dispatch route (20 handlers, last-registered matches)
Results on Apple M4 Max / go1.26.2: ours wins 3 of 4 paths and is
2nd of 5 in the round-trip path. Full report at
docs/benchmarks/2026-05-10-comparison.md, raw output committed under
test/benchmarks/results/.
Caveats called out in the report:
- codec asymmetry (we ship goccy/go-json; competitors mostly stdlib)
- echotron call bench skipped — built-in rate limiter not externally
configurable; would measure throttling, not the library
- dispatch bench limited to libs with a public sync entry point
(ours, telebot, gobot); gotba has no dispatcher, telego/echotron
use channel/per-chat paradigms not directly comparable
Also gitignores docs/superpowers/ (local brainstorm/spec scratch)
and regenerates docs/reference/dispatch.md after the new
Router.Process method.
49 lines
572 B
Plaintext
49 lines
572 B
Plaintext
# Binaries
|
|
/bin/
|
|
*.exe
|
|
*.dll
|
|
*.so
|
|
*.dylib
|
|
|
|
# Test artifacts
|
|
*.test
|
|
*.out
|
|
coverage.out
|
|
coverage.html
|
|
|
|
# IDE
|
|
.idea/
|
|
.vscode/
|
|
*.swp
|
|
*~
|
|
|
|
# OS
|
|
.DS_Store
|
|
|
|
# Local env
|
|
.env
|
|
.env.local
|
|
|
|
# Superpowers brainstorm/spec scratch — never commit
|
|
docs/superpowers/
|
|
|
|
# Stray binaries at repo root from `go build ./cmd/...` or `go run` artefacts.
|
|
# Listed explicitly (not via /* glob) so source dirs are never accidentally ignored.
|
|
/echo
|
|
/webhook
|
|
/genapi
|
|
/scrape
|
|
/audit
|
|
/callback
|
|
/conversation
|
|
/files
|
|
/inline
|
|
/middleware
|
|
/stateful
|
|
/admin
|
|
/moderation
|
|
/pagination
|
|
/payments
|
|
/polls
|
|
/welcome
|