framebench

command
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: BSD-3-Clause Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command framebench is a frame-time benchmark harness for the dirty-region partial-repaint optimization (pre-rebrand issue #9). The GL/WebGPU paint path cannot be exercised by the software-painter golden suite, so the optimization can only be measured on a real GPU. This harness builds a deliberately heavy, mostly static scene and then drives one deterministic update workload at a fixed cadence, so the same binary built with and without the nopartialrepaint tag (partial repaint is on by default on desktop, #496) can be compared apples-to-apples.

Measurement is done by the driver's BELLUI_FRAME_DEBUG profiler (internal/driver /glfw/frametime.go), which this harness enables. Run one workload per process so the profiler's shutdown flush reports the whole run as a single sample set:

# build both variants
go build -tags nopartialrepaint -o /tmp/framebench.full ./cmd/framebench
go build -o /tmp/framebench.partial ./cmd/framebench

# compare the localized-update case (the one partial repaint should win)
/tmp/framebench.full    -workload spot
/tmp/framebench.partial -workload spot

# and the whole-canvas case (partial should gracefully match full)
/tmp/framebench.full    -workload full
/tmp/framebench.partial -workload full

Workloads:

spot   — toggle a single small label in one corner each frame. Only a tiny
         region changes, so partial repaint should clear+redraw far less.
full   — Refresh the whole content tree each frame. The dirty region covers
         the canvas, so partial repaint falls back to a full clear; this
         workload checks the optimization adds no regression in the worst case.
scroll — scroll a long list by one row each frame (a realistic medium case).

Jump to

Keyboard shortcuts

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