Skip to content

Add console.timeStamp benchmark#52859

Closed
sbuggay wants to merge 3 commits into
react:mainfrom
sbuggay:export-D78914518
Closed

Add console.timeStamp benchmark#52859
sbuggay wants to merge 3 commits into
react:mainfrom
sbuggay:export-D78914518

Conversation

@sbuggay

@sbuggay sbuggay commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

Summary:
Add a console.timeStamp benchmark.

Performance API

(index) Task name Latency average (ns) Latency median (ns) Throughput average (ops/s) Throughput median (ops/s) Samples
0 'mark (default)' '4461.54 ± 0.46%' '4376.00' '227428 ± 0.02%' '228519' 224138
1 'mark (with custom startTime)' '3908.82 ± 0.68%' '3796.00' '261599 ± 0.02%' '263435' 255832
2 'measure (default)' '4461.29 ± 0.51%' '4367.00' '228027 ± 0.02%' '228990' 224151
3 'measure (with start and end timestamps)' '4458.98 ± 0.59%' '4356.00' '227829 ± 0.02%' '229568' 224267
4 'measure (with mark names)' '4473.34 ± 1.03%' '4357.00' '227993 ± 0.02%' '229516' 223547
5 'clearMarks' '1023.77 ± 0.66%' '991.00' '1001044 ± 0.01%' '1009082' 976779
6 'clearMeasures' '1061.67 ± 1.13%' '1012.00' '978152 ± 0.01%' '988142' 941913
7 'mark + clearMarks' '5362.40 ± 0.71%' '5198.00' '191130 ± 0.03%' '192382' 186484
8 'measure + clearMeasures (with start and end timestamps)' '5336.53 ± 1.25%' '5078.00' '195237 ± 0.03%' '196928' 187388
9 'measure + clearMeasures (with mark names)' '5056.59 ± 0.70%' '4877.00' '203040 ± 0.03%' '205044' 197762
10 'console.timeStamp' '737.65 ± 0.87%' '711.00' '1397203 ± 0.01%' '1406470' 1355662

Performance API (mode 🚀, jsMode 🐛)

(index) Task name Latency average (ns) Latency median (ns) Throughput average (ops/s) Throughput median (ops/s) Samples
0 'mark (default)' '2360.29 ± 0.86%' '2313.00' '430172 ± 0.01%' '432339' 423677
1 'mark (with custom startTime)' '2109.46 ± 0.88%' '2063.00' '482090 ± 0.01%' '484731' 474054
2 'measure (default)' '2465.00 ± 1.46%' '2403.00' '415030 ± 0.01%' '416146' 405680
3 'measure (with start and end timestamps)' '2285.83 ± 0.92%' '2233.00' '445739 ± 0.01%' '447828' 437477
4 'measure (with mark names)' '2424.85 ± 0.37%' '2393.00' '415565 ± 0.01%' '417885' 412397
5 'clearMarks' '737.11 ± 0.03%' '721.00' '1366303 ± 0.01%' '1386963' 1356647
6 'clearMeasures' '720.52 ± 0.07%' '701.00' '1407253 ± 0.01%' '1426534' 1387882
7 'mark + clearMarks' '2857.63 ± 1.14%' '2754.00' '361062 ± 0.02%' '363108' 349941
8 'measure + clearMeasures (with start and end timestamps)' '2754.35 ± 1.01%' '2654.00' '373865 ± 0.02%' '376790' 363063
9 'measure + clearMeasures (with mark names)' '2751.14 ± 0.55%' '2694.00' '368710 ± 0.02%' '371195' 363486
10 'console.timeStamp' '443.95 ± 0.07%' '431.00' '2284563 ± 0.01%' '2320186' 2252482

Performance API (mode 🚀)

(index) Task name Latency average (ns) Latency median (ns) Throughput average (ops/s) Throughput median (ops/s) Samples
0 'mark (default)' '1912.09 ± 1.02%' '1863.00' '532939 ± 0.01%' '536769' 522989
1 'mark (with custom startTime)' '1847.81 ± 2.48%' '1773.00' '561174 ± 0.01%' '564016' 541182
2 'measure (default)' '1990.39 ± 1.41%' '1933.00' '514455 ± 0.01%' '517331' 502415
3 'measure (with start and end timestamps)' '2063.03 ± 1.17%' '2003.00' '495817 ± 0.01%' '499251' 484724
4 'measure (with mark names)' '2184.36 ± 1.14%' '2134.00' '465101 ± 0.01%' '468604' 457801
5 'clearMarks' '703.02 ± 0.03%' '691.00' '1432610 ± 0.01%' '1447178' 1422431
6 'clearMeasures' '682.09 ± 0.03%' '671.00' '1477044 ± 0.01%' '1490313' 1466091
7 'mark + clearMarks' '2420.30 ± 1.32%' '2313.00' '428224 ± 0.02%' '432339' 413173
8 'measure + clearMeasures (with start and end timestamps)' '2423.89 ± 1.30%' '2343.00' '424852 ± 0.01%' '426803' 412560
9 'measure + clearMeasures (with mark names)' '2432.48 ± 0.89%' '2384.00' '416522 ± 0.01%' '419463' 411858
10 'console.timeStamp' '407.00 ± 0.03%' '401.00' '2473111 ± 0.01%' '2493766' 2456981

Changelog: [Internal]

Differential Revision: D78914518

sbuggay added 3 commits July 28, 2025 00:45
Summary:

Hardens RN to running in mismatched opt/dev modes.

While adding an opt native/dev js mode to fantom, LogBox was trying to load NativeDevSettings when it didn't exist because of mode mismatch.

This is the only location it's happening, so this just moves the NativeDevSettings load into the one function that needs it.

Changelog: [Internal]

Differential Revision: D78952284
Summary:

Adds an additional pragma allowing tests to specify which mode JS should run in. By default this new JS mode will match the regular selected mode, and only shows up in the title if it differs.

### View ###

| (index) | Task name                                                 | Latency average (ns)   | Latency median (ns)        | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | ---------------------- | -------------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'render 100 uncollapsable views'                          | '22196658.83 ± 0.55%'  | '22105506.50 ± 14452.50'   | '45 ± 0.52%'               | '45'                      | 64      |
| 1       | 'render 1000 uncollapsable views'                         | '261264120.72 ± 0.51%' | '260129906.50 ± 4932.50'   | '4 ± 0.47%'                | '4'                       | 64      |
| 2       | 'render 100 views with large amount of props and styles'  | '46221879.73 ± 1.32%'  | '45766943.00 ± 175.00'     | '22 ± 0.96%'               | '22'                      | 64      |
| 3       | 'render 1000 views with large amount of props and styles' | '511129295.53 ± 1.11%' | '507136026.50 ± 110.50'    | '2 ± 0.85%'                | '2'                       | 64      |
| 4       | 'render 1500 views with large amount of props and styles' | '809121466.03 ± 0.98%' | '805250386.00 ± 124858.00' | '1 ± 0.75%'                | '1'                       | 64      |

### View (mode 🚀, jsMode 🐛) ###

| (index) | Task name                                                 | Latency average (ns)   | Latency median (ns)        | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | ---------------------- | -------------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'render 100 uncollapsable views'                          | '10159906.01 ± 1.31%'  | '9852036.00'               | '99 ± 1.17%'               | '102'                     | 99      |
| 1       | 'render 1000 uncollapsable views'                         | '140887334.83 ± 1.46%' | '139692094.50 ± 95652.50'  | '7 ± 1.14%'                | '7'                       | 64      |
| 2       | 'render 100 views with large amount of props and styles'  | '23331150.55 ± 1.60%'  | '22600244.50 ± 24962.50'   | '43 ± 1.34%'               | '44'                      | 64      |
| 3       | 'render 1000 views with large amount of props and styles' | '273211225.98 ± 1.41%' | '272005374.00 ± 115394.00' | '4 ± 1.20%'                | '4'                       | 64      |
| 4       | 'render 1500 views with large amount of props and styles' | '442607142.55 ± 1.20%' | '434820116.00 ± 455811.00' | '2 ± 1.04%'                | '2'                       | 64      |


### View (mode 🚀) ###

| (index) | Task name                                                 | Latency average (ns)   | Latency median (ns)        | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | ---------------------- | -------------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'render 100 uncollapsable views'                          | '4104493.33 ± 2.08%'   | '3923198.00 ± 110.00'      | '248 ± 1.32%'              | '255'                     | 244     |
| 1       | 'render 1000 uncollapsable views'                         | '87679050.92 ± 1.28%'  | '87123912.50 ± 5743.50'    | '11 ± 1.26%'               | '11'                      | 64      |
| 2       | 'render 100 views with large amount of props and styles'  | '14064648.78 ± 1.90%'  | '13587137.00 ± 6355.00'    | '71 ± 1.50%'               | '74'                      | 72      |
| 3       | 'render 1000 views with large amount of props and styles' | '184107829.77 ± 0.77%' | '183228851.00 ± 53144.00'  | '5 ± 0.77%'                | '5'                       | 64      |
| 4       | 'render 1500 views with large amount of props and styles' | '317639710.20 ± 1.17%' | '310442132.00 ± 366431.00' | '3 ± 1.11%'                | '3'                       | 64      |

Changelog: [Internal]

Differential Revision: D78912257
Summary:
Add a console.timeStamp benchmark.

### Performance API ###

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '4461.54 ± 0.46%'    | '4376.00'           | '227428 ± 0.02%'           | '228519'                  | 224138  |
| 1       | 'mark (with custom startTime)'                            | '3908.82 ± 0.68%'    | '3796.00'           | '261599 ± 0.02%'           | '263435'                  | 255832  |
| 2       | 'measure (default)'                                       | '4461.29 ± 0.51%'    | '4367.00'           | '228027 ± 0.02%'           | '228990'                  | 224151  |
| 3       | 'measure (with start and end timestamps)'                 | '4458.98 ± 0.59%'    | '4356.00'           | '227829 ± 0.02%'           | '229568'                  | 224267  |
| 4       | 'measure (with mark names)'                               | '4473.34 ± 1.03%'    | '4357.00'           | '227993 ± 0.02%'           | '229516'                  | 223547  |
| 5       | 'clearMarks'                                              | '1023.77 ± 0.66%'    | '991.00'            | '1001044 ± 0.01%'          | '1009082'                 | 976779  |
| 6       | 'clearMeasures'                                           | '1061.67 ± 1.13%'    | '1012.00'           | '978152 ± 0.01%'           | '988142'                  | 941913  |
| 7       | 'mark + clearMarks'                                       | '5362.40 ± 0.71%'    | '5198.00'           | '191130 ± 0.03%'           | '192382'                  | 186484  |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '5336.53 ± 1.25%'    | '5078.00'           | '195237 ± 0.03%'           | '196928'                  | 187388  |
| 9       | 'measure + clearMeasures (with mark names)'               | '5056.59 ± 0.70%'    | '4877.00'           | '203040 ± 0.03%'           | '205044'                  | 197762  |
| 10      | 'console.timeStamp'                                       | '737.65 ± 0.87%'     | '711.00'            | '1397203 ± 0.01%'          | '1406470'                 | 1355662 |

### Performance API (mode 🚀, jsMode 🐛) ###

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '2360.29 ± 0.86%'    | '2313.00'           | '430172 ± 0.01%'           | '432339'                  | 423677  |
| 1       | 'mark (with custom startTime)'                            | '2109.46 ± 0.88%'    | '2063.00'           | '482090 ± 0.01%'           | '484731'                  | 474054  |
| 2       | 'measure (default)'                                       | '2465.00 ± 1.46%'    | '2403.00'           | '415030 ± 0.01%'           | '416146'                  | 405680  |
| 3       | 'measure (with start and end timestamps)'                 | '2285.83 ± 0.92%'    | '2233.00'           | '445739 ± 0.01%'           | '447828'                  | 437477  |
| 4       | 'measure (with mark names)'                               | '2424.85 ± 0.37%'    | '2393.00'           | '415565 ± 0.01%'           | '417885'                  | 412397  |
| 5       | 'clearMarks'                                              | '737.11 ± 0.03%'     | '721.00'            | '1366303 ± 0.01%'          | '1386963'                 | 1356647 |
| 6       | 'clearMeasures'                                           | '720.52 ± 0.07%'     | '701.00'            | '1407253 ± 0.01%'          | '1426534'                 | 1387882 |
| 7       | 'mark + clearMarks'                                       | '2857.63 ± 1.14%'    | '2754.00'           | '361062 ± 0.02%'           | '363108'                  | 349941  |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '2754.35 ± 1.01%'    | '2654.00'           | '373865 ± 0.02%'           | '376790'                  | 363063  |
| 9       | 'measure + clearMeasures (with mark names)'               | '2751.14 ± 0.55%'    | '2694.00'           | '368710 ± 0.02%'           | '371195'                  | 363486  |
| 10      | 'console.timeStamp'                                       | '443.95 ± 0.07%'     | '431.00'            | '2284563 ± 0.01%'          | '2320186'                 | 2252482 |


### Performance API (mode 🚀) ###

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '1912.09 ± 1.02%'    | '1863.00'           | '532939 ± 0.01%'           | '536769'                  | 522989  |
| 1       | 'mark (with custom startTime)'                            | '1847.81 ± 2.48%'    | '1773.00'           | '561174 ± 0.01%'           | '564016'                  | 541182  |
| 2       | 'measure (default)'                                       | '1990.39 ± 1.41%'    | '1933.00'           | '514455 ± 0.01%'           | '517331'                  | 502415  |
| 3       | 'measure (with start and end timestamps)'                 | '2063.03 ± 1.17%'    | '2003.00'           | '495817 ± 0.01%'           | '499251'                  | 484724  |
| 4       | 'measure (with mark names)'                               | '2184.36 ± 1.14%'    | '2134.00'           | '465101 ± 0.01%'           | '468604'                  | 457801  |
| 5       | 'clearMarks'                                              | '703.02 ± 0.03%'     | '691.00'            | '1432610 ± 0.01%'          | '1447178'                 | 1422431 |
| 6       | 'clearMeasures'                                           | '682.09 ± 0.03%'     | '671.00'            | '1477044 ± 0.01%'          | '1490313'                 | 1466091 |
| 7       | 'mark + clearMarks'                                       | '2420.30 ± 1.32%'    | '2313.00'           | '428224 ± 0.02%'           | '432339'                  | 413173  |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '2423.89 ± 1.30%'    | '2343.00'           | '424852 ± 0.01%'           | '426803'                  | 412560  |
| 9       | 'measure + clearMeasures (with mark names)'               | '2432.48 ± 0.89%'    | '2384.00'           | '416522 ± 0.01%'           | '419463'                  | 411858  |
| 10      | 'console.timeStamp'                                       | '407.00 ± 0.03%'     | '401.00'            | '2473111 ± 0.01%'          | '2493766'                 | 2456981 |

Changelog: [Internal]

Differential Revision: D78914518
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jul 28, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D78914518

@react-native-bot

Copy link
Copy Markdown
Collaborator

This PR is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.

@react-native-bot react-native-bot added Stale There has been a lack of activity on this issue and it may be closed soon. and removed Stale There has been a lack of activity on this issue and it may be closed soon. labels Jan 25, 2026
@react-native-bot

Copy link
Copy Markdown
Collaborator

Closing this PR as the diff D78914518 has been abandoned internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants