Improved interface

This commit is contained in:
2024-03-11 22:08:28 +01:00
parent 71dd96406c
commit 8ad0b2e182
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("")
}
}