MCPcopy Create free account
hub / github.com/cogentcore/core / BenchmarkScan

Function BenchmarkScan

paint/raster/raster_test.go:109–122  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

107}
108
109func BenchmarkScan(b *testing.B) {
110 var (
111 p = GetTestPath()
112 wx, wy = 512, 512
113 img = image.NewRGBA(image.Rect(0, 0, wx, wy))
114 scanner = scan.NewScanner(scan.NewImgSpanner(img), wx, wy)
115 )
116 f := NewFiller(wx, wy, scanner)
117 p.AddTo(f)
118 b.ResetTimer()
119 for i := 0; i < b.N; i++ {
120 f.Draw()
121 }
122}
123
124func BenchmarkFill(b *testing.B) {
125 var (

Callers

nothing calls this directly

Calls 6

NewScannerFunction · 0.92
NewImgSpannerFunction · 0.92
GetTestPathFunction · 0.85
NewFillerFunction · 0.85
AddToMethod · 0.80
DrawMethod · 0.65

Tested by

no test coverage detected