Improved interface

This commit is contained in:
Eduard Urbach 2024-03-11 22:08:28 +01:00
parent cd70550a0a
commit 6db2852d9e
Signed by: eduard
GPG key ID: 49226B848C78F6C8
5 changed files with 58 additions and 20 deletions

View file

@ -19,7 +19,7 @@ func BenchmarkLCH(b *testing.B) {
}
}
func BenchmarkFprintColorized(b *testing.B) {
func BenchmarkFprint(b *testing.B) {
color.Terminal = true
c := color.RGB(1.0, 1.0, 1.0)
@ -36,3 +36,21 @@ func BenchmarkFprintRaw(b *testing.B) {
c.Fprint(io.Discard, "")
}
}
func BenchmarkPrint(b *testing.B) {
color.Terminal = true
c := color.RGB(1.0, 1.0, 1.0)
for i := 0; i < b.N; i++ {
c.Print("")
}
}
func BenchmarkPrintRaw(b *testing.B) {
color.Terminal = false
c := color.RGB(1.0, 1.0, 1.0)
for i := 0; i < b.N; i++ {
c.Print("")
}
}