Browse Source

feat(perf-issues): Add rollout UI for MN+1 detector (#44891)

Matt Quinn 2 years ago
parent
commit
0062ee7a70
2 changed files with 43 additions and 0 deletions
  1. 11 0
      static/app/views/admin/adminSettings.tsx
  2. 32 0
      static/app/views/admin/options.tsx

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

@@ -43,6 +43,10 @@ const optionsAvailable = [
   'performance.issues.render_blocking_assets.la-rollout',
   'performance.issues.render_blocking_assets.ea-rollout',
   'performance.issues.render_blocking_assets.ga-rollout',
+  'performance.issues.m_n_plus_one_db.problem-creation',
+  'performance.issues.m_n_plus_one_db.la-rollout',
+  'performance.issues.m_n_plus_one_db.ea-rollout',
+  'performance.issues.m_n_plus_one_db.ga-rollout',
   'profile.issues.blocked_main_thread-ingest.la-rollout',
   'profile.issues.blocked_main_thread-ingest.ea-rollout',
   'profile.issues.blocked_main_thread-ingest.ga-rollout',
@@ -171,6 +175,13 @@ export default class AdminSettings extends AsyncView<{}, State> {
               {fields['performance.issues.render_blocking_assets.ea-rollout']}
               {fields['performance.issues.render_blocking_assets.ga-rollout']}
             </Panel>
+            <Panel>
+              <PanelHeader>Performance Issues - MN+1 DB Detector</PanelHeader>
+              {fields['performance.issues.m_n_plus_one_db.problem-creation']}
+              {fields['performance.issues.m_n_plus_one_db.la-rollout']}
+              {fields['performance.issues.m_n_plus_one_db.ea-rollout']}
+              {fields['performance.issues.m_n_plus_one_db.ga-rollout']}
+            </Panel>
             <Panel>
               <PanelHeader>Profiling Issues - Block Main Thread Detector</PanelHeader>
               {fields['profile.issues.blocked_main_thread-ingest.la-rollout']}

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

@@ -311,6 +311,38 @@ const performanceOptionDefinitions: Field[] = [
     ),
     ...HIGH_THROUGHPUT_RATE_OPTION,
   },
+  {
+    key: 'performance.issues.m_n_plus_one_db.problem-creation',
+    label: t('Problem Creation Rate'),
+    help: t(
+      'Controls the overall rate at which performance problems are detected by the MN+1 DB detector.'
+    ),
+    ...HIGH_THROUGHPUT_RATE_OPTION,
+  },
+  {
+    key: 'performance.issues.m_n_plus_one_db.la-rollout',
+    label: t('Limited Availability Detection Rate'),
+    help: t(
+      'Controls the % of orgs in which performance problems are detected by the MN+1 DB detector for LA organizations.'
+    ),
+    ...HIGH_THROUGHPUT_RATE_OPTION,
+  },
+  {
+    key: 'performance.issues.m_n_plus_one_db.ea-rollout',
+    label: t('Early Adopter Detection Rate'),
+    help: t(
+      'Controls the % of orgs in which performance problems are detected by the MN+1 DB detector for EA organizations.'
+    ),
+    ...HIGH_THROUGHPUT_RATE_OPTION,
+  },
+  {
+    key: 'performance.issues.m_n_plus_one_db.ga-rollout',
+    label: t('General Availability Detection Rate'),
+    help: t(
+      'Controls the % of orgs in which performance problems are detected by the MN+1 DB detector for GA organizations.'
+    ),
+    ...HIGH_THROUGHPUT_RATE_OPTION,
+  },
   {
     key: 'performance.issues.render_blocking_assets.problem-creation',
     label: t('Problem Creation Rate'),