This commit is contained in:
parent
9c8f71be07
commit
16881d5e5a
2 changed files with 0 additions and 0 deletions
37
bench_test.go
Normal file
37
bench_test.go
Normal file
|
@ -0,0 +1,37 @@
|
|||
package color_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.urbach.dev/go/color"
|
||||
)
|
||||
|
||||
func BenchmarkRGB(b *testing.B) {
|
||||
for b.Loop() {
|
||||
color.RGB(1.0, 1.0, 1.0)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkLCH(b *testing.B) {
|
||||
for b.Loop() {
|
||||
color.LCH(0.5, 0.5, 0.0)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkPrint(b *testing.B) {
|
||||
color.Terminal = true
|
||||
c := color.RGB(1.0, 1.0, 1.0)
|
||||
|
||||
for b.Loop() {
|
||||
c.Print("")
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkPrintRaw(b *testing.B) {
|
||||
color.Terminal = false
|
||||
c := color.RGB(1.0, 1.0, 1.0)
|
||||
|
||||
for b.Loop() {
|
||||
c.Print("")
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue