Skip to content

Commit 0766587

Browse files
rubennortefacebook-github-bot
authored andcommitted
Add playground benchmark (facebook#51259)
Summary: Pull Request resolved: facebook#51259 Changelog: [internal] We recently added `Playground-itest` as a quick way to test things with Fantom without committing them. This does the same for benchmarks, so we can quickly answer questions like: > is `key in obj` faster than `obj[key]`? Without having to create a new benchmark manually. Reviewed By: yungsters Differential Revision: D74578297 fbshipit-source-id: d86604d459f15652d0c2e1ad16a99d011a1324ca
1 parent eedd60b commit 0766587

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @flow strict-local
8+
* @format
9+
* @oncall react_native
10+
*/
11+
12+
import '@react-native/fantom/src/setUpDefaultReactNativeEnvironment';
13+
14+
import * as Fantom from '@react-native/fantom';
15+
16+
Fantom.unstable_benchmark
17+
.suite('Playground benchmark')
18+
.test('Variant 1', () => {
19+
// Add your tests here, but do NOT commit them.
20+
})
21+
.test('Variant 2', () => {
22+
// Add your tests here, but do NOT commit them.
23+
})
24+
.test('Variant 3', () => {
25+
// Add your tests here, but do NOT commit them.
26+
});

0 commit comments

Comments
 (0)