12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #include "Locale.h"
- #include <benchmark/benchmark.h>
- namespace minikin {
- static void BM_Locale_en_US(benchmark::State& state) {
- while (state.KeepRunning()) {
- Locale language(StringPiece("en-US", 5));
- }
- }
- BENCHMARK(BM_Locale_en_US);
- static void BM_Locale_en_Latn_US(benchmark::State& state) {
- while (state.KeepRunning()) {
- Locale language(StringPiece("en-Latn-US", 10));
- }
- }
- BENCHMARK(BM_Locale_en_Latn_US);
- static void BM_Locale_en_Latn_US_u_em_emoji(benchmark::State& state) {
- while (state.KeepRunning()) {
- Locale language(StringPiece("en-Latn-US-u-em-emoji", 21));
- }
- }
- BENCHMARK(BM_Locale_en_Latn_US_u_em_emoji);
- }
|