Commit a69194e
[skip ci] Add basic benchmarks for the Performance API (facebook#49638)
Summary:
Changelog: [internal]
This adds a basic benchmark for different use cases of the `performance` API.
Baseline:
| (index) | Task name | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0 | 'mark (default)' | '5692.08 ± 0.33%' | '5590.00' | '177735 ± 0.02%' | '178891' | 175683 |
| 1 | 'mark (with custom startTime)' | '5775.21 ± 0.27%' | '5690.00' | '174880 ± 0.02%' | '175747' | 173154 |
| 2 | 'measure (with start and end timestamps)' | '6842.61 ± 0.35%' | '6730.00' | '147672 ± 0.02%' | '148588' | 146144 |
| 3 | 'measure (with mark names)' | '6828.01 ± 0.75%' | '6700.00' | '148371 ± 0.02%' | '149254' | 146456 |
| 4 | 'clearMarks' | '817.04 ± 0.03%' | '800.00' | '1233054 ± 0.01%' | '1250000' | 1223933 |
| 5 | 'clearMeasures' | '835.59 ± 0.03%' | '820.00' | '1203121 ± 0.01%' | '1219512' | 1196758 |
| 6 | 'mark + clearMarks' | '6137.42 ± 1.32%' | '5920.00' | '167661 ± 0.02%' | '168919' | 162935 |
| 7 | 'measure + clearMeasures (with start and end timestamps)' | '7353.85 ± 0.60%' | '7200.00' | '138196 ± 0.02%' | '138889' | 135984 |
| 8 | 'measure + clearMeasures (with mark names)' | '7342.93 ± 0.66%' | '7170.00' | '138726 ± 0.02%' | '139470' | 136186 |
Reviewed By: bgirard
Differential Revision: D669261821 parent c66728d commit a69194e
File tree
1 file changed
+123
-0
lines changed- packages/react-native/src/private/webapis/performance/__tests__
1 file changed
+123
-0
lines changedLines changed: 123 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
0 commit comments