diff options
author | dan <dan.abramov@gmail.com> | 2024-03-08 04:33:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-08 04:33:42 +0000 |
commit | dd86d0964d391e9748843aa1a6400d73c3a6d9f9 (patch) | |
tree | 8c933289407077d6036f144c57acd21b8a2fef33 /src/Navigation.tsx | |
parent | 31826633cb1d1180875b20e218a39ce341ab2ec0 (diff) | |
download | voidsky-dd86d0964d391e9748843aa1a6400d73c3a6d9f9.tar.zst |
Enable gating and experimentation on native, send init event (#3149)
* Add the mobile fork * Add init event
Diffstat (limited to 'src/Navigation.tsx')
-rw-r--r-- | src/Navigation.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Navigation.tsx b/src/Navigation.tsx index b30f8f982..8a9f69b5d 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -78,6 +78,7 @@ import {createNativeStackNavigatorWithAuth} from './view/shell/createNativeStack import {msg} from '@lingui/macro' import {i18n, MessageDescriptor} from '@lingui/core' import HashtagScreen from '#/screens/Hashtag' +import {logEvent} from './lib/statsig/statsig' const navigationRef = createNavigationContainerRef<AllNavigatorParams>() @@ -649,11 +650,14 @@ function logModuleInitTime() { return } didInit = true + const initMs = Math.round( // @ts-ignore Emitted by Metro in the bundle prelude performance.now() - global.__BUNDLE_START_TIME__, ) console.log(`Time to first paint: ${initMs} ms`) + logEvent('init', initMs) + if (__DEV__) { // This log is noisy, so keep false committed const shouldLog = false |