all repos — emoji @ 2859f12eb9c87695a3b1e0145792aba32e94d264

A minimalistic emoji package for Go (golang)

add initial benchmarks
Enes Çakır enes@cakir.web.tr
Wed, 19 Feb 2020 00:14:55 +0300
commit

2859f12eb9c87695a3b1e0145792aba32e94d264

parent

8ec71710fc129a998db2f2236de7f006262d0428

1 files changed, 24 insertions(+), 0 deletions(-)

jump to
M emoji_test.goemoji_test.go

@@ -105,3 +105,27 @@ t.Fatalf("test case %v fail: %v", i+1, err)

} } } + +func BenchmarkEmoji(b *testing.B) { + for n := 0; n < b.N; n++ { + _ = WavingHand.String() + } +} + +func BenchmarkEmojiWithTone(b *testing.B) { + for n := 0; n < b.N; n++ { + _ = WavingHand.Tone(Medium).String() + } +} + +func BenchmarkEmojiWithToneTwo(b *testing.B) { + for n := 0; n < b.N; n++ { + _ = WomanAndManHoldingHandsWithTwoTone.Tone(Medium, Dark).String() + } +} + +func BenchmarkCountryFlag(b *testing.B) { + for n := 0; n < b.N; n++ { + _, _ = CountryFlag("tr") + } +}