Add the Benchmark blog template (`blog-benchmark`)

クローズ
#301 コメント 3 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@piyusshhjangid がすでに取り組んでいます。

2026年10月28日 から。

  • #303 @piyusshhjangid による — マージ済み

評価

この issue はまだ評価されていません。

説明

good first issue hacktoberfest templates

Part of #5. For posts that compare how fast (or how big) a few things are.

Idea
A small "Benchmark" label in the accent color at the top, the post title under it ("Bun vs Deno vs Node: HTTP throughput") with an optional one-line note ("Requests per second, higher is better"). Then up to four horizontal bars, one per row: the name on the left ("Bun"), the bar, and the number at the end ("112,000 req/s"). Every bar is scaled to the largest value, so the largest one fills its track and is drawn in the accent color, while the others use a muted color. The site name sits at the bottom.

Template details

  • File: src/templates/blog/benchmark.ts, id blog-benchmark
  • Fields: commonFields.title, commonFields.description (the note, optional), name1 to name4 (text, optional, defaults "Bun", "Deno", "Node" and blank), value1 to value4 (number, optional, defaults 112000, 71000, 48000 and blank), unit (text, optional, default "req/s"), commonFields.siteName, commonFields.bgColor, commonFields.accentColor, commonFields.textColor

Where to look

  • Closest reference: src/templates/github/language-bars.ts (rows of labeled bars), src/templates/blog/table-of-contents.ts (a short list where blank rows are skipped)

Acceptance criteria

  • Bars are scaled to the largest value, the largest is in the accent color, and the numbers show with thousands separators plus the unit when it's set
  • A row with a blank name, or a value that isn't a number of 0 or more, is skipped with no gap; all-zero values draw empty bars without dividing by zero; and with every row skipped the chart area hides cleanly
  • A long title, note or name shrinks with autoFontSize() and then truncates
  • The label and the accent bar stay readable on a light background
  • Re-exported in src/templates/blog/index.ts and registered in the blog block of src/templates/registry.ts
  • Meets the shared template checklist in #5

One template per contributor at a time, so more people get a chance.


Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #301 in the description.

主要言語
TypeScript
スター
8
フォーク
4
平均マージ
8時間 19分
マージ済み PR(30日)
161

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codercops/ogcops のほかの issue

codercops/ogcops の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。