This commit is contained in:
potassium5703 2024-09-03 19:49:27 +03:00
parent a49ce499e2
commit 7c1911bbda
2 changed files with 11 additions and 8 deletions

2
genprof Executable file
View File

@ -0,0 +1,2 @@
go test -cpuprofile=profile.out -bench=BenchmarkSinglePixel &&
go tool pprof -text profile.out

View File

@ -36,7 +36,8 @@ func BenchmarkScale(b *testing.B) {
for i := 0; i < b.N; i++ {
err := png.Encode(io.Discard,
Scale(Render(
texture.New(color.White, color.Black, 2),
texture.New(color.White,
color.Black, 2),
image.Rect(0, 0, 64, 64),
), 64),
)