diff --git a/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.test.ts b/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.test.ts index 71830f4e04a57..6fe5feceb5cbe 100644 --- a/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.test.ts +++ b/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.test.ts @@ -242,15 +242,15 @@ describe('response processing', () => { const data = await loadStatus({ http, notifications }); const names = data.metrics.map((m) => m.name); expect(names).toEqual([ - 'Heap total', - 'Heap used', + 'Heap used out of 976.56 KB', 'Requests per second', + 'Utilization (active: 1.00 / idle: 1.00)', 'Load', 'Delay', 'Response time avg', ]); const values = data.metrics.map((m) => m.value); - expect(values).toEqual([1000000, 100, 400, [4.1, 2.1, 0.1], 1, 4000]); + expect(values).toEqual([100, 400, 1, [4.1, 2.1, 0.1], 1, 4000]); }); test('adds meta details to Load, Delay and Response time', async () => { diff --git a/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts b/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts index c3ebd9923e2a8..6672786c72a10 100644 --- a/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts +++ b/packages/core/apps/core-apps-browser-internal/src/status/lib/load_status.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import numeral from '@elastic/numeral'; import { i18n } from '@kbn/i18n'; import type { HttpSetup } from '@kbn/core-http-browser'; import type { NotificationsSetup } from '@kbn/core-notifications-browser'; @@ -57,16 +58,10 @@ function formatMetrics({ metrics }: StatusResponse): Metric[] { } return [ - { - name: i18n.translate('core.statusPage.metricsTiles.columns.heapTotalHeader', { - defaultMessage: 'Heap total', - }), - value: metrics.process.memory.heap.size_limit, - type: 'byte', - }, { name: i18n.translate('core.statusPage.metricsTiles.columns.heapUsedHeader', { - defaultMessage: 'Heap used', + defaultMessage: 'Heap used out of {heapTotal}', + values: { heapTotal: numeral(metrics.process.memory.heap.size_limit).format('0.00 b') }, }), value: metrics.process.memory.heap.used_in_bytes, type: 'byte', @@ -78,6 +73,17 @@ function formatMetrics({ metrics }: StatusResponse): Metric[] { value: (metrics.requests.total * 1000) / metrics.collection_interval_in_millis, type: 'float', }, + { + name: i18n.translate('core.statusPage.metricsTiles.columns.utilizationHeader', { + defaultMessage: 'Utilization (active: {active} / idle: {idle})', + values: { + active: numeral(metrics.process.event_loop_utilization.active).format('0.00'), + idle: numeral(metrics.process.event_loop_utilization.idle).format('0.00'), + }, + }), + value: metrics.process.event_loop_utilization.utilization, + type: 'float', + }, { name: i18n.translate('core.statusPage.metricsTiles.columns.loadHeader', { defaultMessage: 'Load', diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 68c4179861a16..5690d2906422b 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -930,8 +930,6 @@ "core.status.yellowTitle": "Jaune", "core.statusPage.coreStatus.sectionTitle": "Statut principal", "core.statusPage.loadStatus.serverIsDownErrorMessage": "Échec de requête du statut du serveur. Votre serveur est peut-être indisponible ?", - "core.statusPage.metricsTiles.columns.heapTotalHeader": "Tas total", - "core.statusPage.metricsTiles.columns.heapUsedHeader": "Tas utilisé", "core.statusPage.metricsTiles.columns.load.metaHeader": "Intervalle de charge", "core.statusPage.metricsTiles.columns.loadHeader": "Charge", "core.statusPage.metricsTiles.columns.processDelayDetailsHeader": "Centiles", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 24ae4e2592b2a..b252f78f15cf1 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -930,8 +930,6 @@ "core.status.yellowTitle": "黄", "core.statusPage.coreStatus.sectionTitle": "コアステータス", "core.statusPage.loadStatus.serverIsDownErrorMessage": "サーバーステータスのリクエストに失敗しました。サーバーがダウンしている可能性があります。", - "core.statusPage.metricsTiles.columns.heapTotalHeader": "ヒープ合計", - "core.statusPage.metricsTiles.columns.heapUsedHeader": "使用ヒープ", "core.statusPage.metricsTiles.columns.load.metaHeader": "読み込み間隔", "core.statusPage.metricsTiles.columns.loadHeader": "読み込み", "core.statusPage.metricsTiles.columns.processDelayDetailsHeader": "パーセンタイル", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index a7325f0d55757..d3b3c374b74bb 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -930,8 +930,6 @@ "core.status.yellowTitle": "黄色", "core.statusPage.coreStatus.sectionTitle": "核心状态", "core.statusPage.loadStatus.serverIsDownErrorMessage": "无法请求服务器状态。也许您的服务器已关闭?", - "core.statusPage.metricsTiles.columns.heapTotalHeader": "堆总数", - "core.statusPage.metricsTiles.columns.heapUsedHeader": "已使用堆数", "core.statusPage.metricsTiles.columns.load.metaHeader": "加载时间间隔", "core.statusPage.metricsTiles.columns.loadHeader": "加载", "core.statusPage.metricsTiles.columns.processDelayDetailsHeader": "百分位数",