Initial commit
This commit is contained in:
commit
7db9e36587
8 changed files with 179 additions and 0 deletions
22
Benchmarks_test.go
Normal file
22
Benchmarks_test.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
package color_test
|
||||
|
||||
import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"git.akyoto.dev/go/color"
|
||||
)
|
||||
|
||||
func BenchmarkRGB(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
color.RGB(1.0, 1.0, 1.0)
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkFprint(b *testing.B) {
|
||||
c := color.RGB(1.0, 1.0, 1.0)
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
c.Fprint(io.Discard, "")
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue