corpus

package
v0.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package corpus is the DATA-007 benchmark corpus: named page, fragment, and route-binding rendering workloads. It is the sole input to the NFR-002 render-throughput gate; the recorded figures live in baseline.json and the policy in BASELINE.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchCreate

func BenchCreate(w http.ResponseWriter, r *http.Request)

func BenchItem

func BenchItem(w http.ResponseWriter, r *http.Request)

func BenchRow

func BenchRow(it Item) ghtmx.Component

BenchRow renders the fragment inline as a component.

func BenchRowFragment

func BenchRowFragment(it Item) ghtmx.Fragment

BenchRowFragment renders only the fragment, for an htmx swap (FR-031).

func BindingWorkload

func BindingWorkload(items []Item) ghtmx.Component

func FragmentWorkload

func FragmentWorkload(items []Item) ghtmx.Component

func Layout

func Layout(title string) ghtmx.Component

func NestedWorkload

func NestedWorkload(items []Item) ghtmx.Component

func PageWorkload

func PageWorkload(title string, items []Item) ghtmx.Component

The three DATA-007 workloads. Sizes are chosen by the benchmarks; the templates stay deterministic (no map iteration) so figures compare across runs.

Types

type Item

type Item struct {
	ID          string
	Name        string
	Description string
	Class       string
	Price       string
}

Item is the row model every workload renders.

func MakeItems

func MakeItems(n int) []Item

MakeItems builds a deterministic item list of the given size.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL