Browse Source

feat(file-io): add to Options UI (#43317)

- This adds the file io option to the options UI
William Mak 2 years ago
parent
commit
3b3f7486ea
2 changed files with 13 additions and 0 deletions
  1. 5 0
      static/app/views/admin/adminSettings.tsx
  2. 8 0
      static/app/views/admin/options.tsx

+ 5 - 0
static/app/views/admin/adminSettings.tsx

@@ -33,6 +33,7 @@ const optionsAvailable = [
   'performance.issues.compressed_assets.la-rollout',
   'performance.issues.compressed_assets.ea-rollout',
   'performance.issues.compressed_assets.ga-rollout',
+  'performance.issues.file_io_main_thread-creation',
 ];
 
 type Field = ReturnType<typeof getOption>;
@@ -134,6 +135,10 @@ export default class AdminSettings extends AsyncView<{}, State> {
               {fields['performance.issues.compressed_assets.ea-rollout']}
               {fields['performance.issues.compressed_assets.ga-rollout']}
             </Panel>
+            <Panel>
+              <PanelHeader>Performance Issues - File IO on Main Thread</PanelHeader>
+              {fields['performance.issues.file_io_main_thread-creation']}
+            </Panel>
           </Feature>
         </Form>
       </div>

+ 8 - 0
static/app/views/admin/options.tsx

@@ -270,6 +270,14 @@ const performanceOptionDefinitions: Field[] = [
     ),
     ...HIGH_THROUGHPUT_RATE_OPTION,
   },
+  {
+    key: 'performance.issues.file_io_main_thread-creation',
+    label: t('File IO Problem Creation Rate'),
+    help: t(
+      'Controls the overall rate at which performance problems are detected by the File IO Detector'
+    ),
+    ...HIGH_THROUGHPUT_RATE_OPTION,
+  },
 ];
 
 // This are ordered based on their display order visually