MCPcopy Index your code
hub / github.com/formatjs/formatjs / run

Function run

packages/intl-localematcher/benchmark/benchmark.ts:8–220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6// due to 700+ locales being auto-loaded and slow locale matching
7
8async function run() {
9 const bench = new Bench({time: 1000})
10
11 // Create a large set of locales to simulate real-world scenario
12 const manyLocales = [
13 'af',
14 'ar',
15 'be',
16 'bg',
17 'ca',
18 'cs',
19 'cy',
20 'da',
21 'de',
22 'el',
23 'en',
24 'es',
25 'et',
26 'eu',
27 'fa',
28 'fi',
29 'fr',
30 'ga',
31 'gl',
32 'gu',
33 'he',
34 'hi',
35 'hr',
36 'hu',
37 'id',
38 'is',
39 'it',
40 'ja',
41 'ka',
42 'kk',
43 'km',
44 'kn',
45 'ko',
46 'ky',
47 'lt',
48 'lv',
49 'mk',
50 'ml',
51 'mn',
52 'mr',
53 'ms',
54 'nb',
55 'ne',
56 'nl',
57 'nn',
58 'no',
59 'pa',
60 'pl',
61 'pt',
62 'ro',
63 'ru',
64 'si',
65 'sk',

Callers 1

benchmark.tsFile · 0.70

Calls 4

findBestMatchFunction · 0.85
logMethod · 0.80
parseLatencyFunction · 0.70
runMethod · 0.65

Tested by

no test coverage detected