mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
1762e0c07b
Signed-off-by: Elias Naur <mail@eliasnaur.com>
21 lines
310 B
Go
21 lines
310 B
Go
// SPDX-License-Identifier: Unlicense OR MIT
|
|
|
|
package main
|
|
|
|
import (
|
|
"image"
|
|
"testing"
|
|
|
|
"gioui.org/layout"
|
|
)
|
|
|
|
func BenchmarkUI(b *testing.B) {
|
|
fetch := func(_ string) {}
|
|
u := newUI(fetch)
|
|
gtx := new(layout.Context)
|
|
for i := 0; i < b.N; i++ {
|
|
gtx.Reset(nil, image.Point{800, 600})
|
|
u.Layout(gtx)
|
|
}
|
|
}
|