Skip to content

Commit e2dbfcd

Browse files
authored
Merge pull request #323 from OpenLiberty/staging
Merge staging to prod - Update metric (#322)
2 parents 4c3bce2 + ba328e0 commit e2dbfcd

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

finish/src/main/webapp/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ <h4>Set course for the Open Liberty guides!</h4>
113113
<script>
114114
displaySystemProperties(); // this calls displayMetrics() because it is a dependency
115115
displayHealth();
116-
//displayConfigProperties();
116+
// displayConfigProperties();
117117
</script>
118118
</body>
119119

finish/src/main/webapp/js/mpData.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ function getSystemMetrics() {
1818
var req = new XMLHttpRequest();
1919

2020
var metricToDisplay = {};
21-
metricToDisplay["application_getProperties_total"] = "Request Count";
22-
metricToDisplay["application_io_openliberty_sample_system_SystemResource_getPropertiesTime_one_min_rate_per_second"] = "Min Request Time (ms)";
23-
metricToDisplay["application_io_openliberty_sample_system_SystemResource_getPropertiesTime_mean_seconds"] = "Mean Request Time (ms)";
24-
metricToDisplay["application_io_openliberty_sample_system_SystemResource_getPropertiesTime_max_seconds"] = "Max Request Time (ms)";
25-
metricToDisplay["base_cpu_processCpuLoad_percent"] = "System CPU Usage (%)";
26-
metricToDisplay["base_memory_usedHeap_bytes"] = "System Heap Usage (MB)";
21+
var SRgetPropertiesTime = "io_openliberty_sample_system_SystemResource_getPropertiesTime";
22+
metricToDisplay["getProperties_total{mp_scope=\"application\",}"] = "Request Count";
23+
metricToDisplay[SRgetPropertiesTime + "_seconds{mp_scope=\"application\",quantile=\"0.999\",}"] = "Request Time (ms) at Quantile 0.999";
24+
metricToDisplay[SRgetPropertiesTime + "_seconds{mp_scope=\"application\",quantile=\"0.5\",}"] = "Request Time (ms) at Quantile 0.5";
25+
metricToDisplay[SRgetPropertiesTime + "_seconds_max{mp_scope=\"application\",}"] = "Max Request Time (ms)";
26+
metricToDisplay["cpu_processCpuLoad_percent{mp_scope=\"base\",}"] = "System CPU Usage (%)";
27+
metricToDisplay["memory_usedHeap_bytes{mp_scope=\"base\",}"] = "System Heap Usage (MB)";
2728

2829
var metricToMatch = "^(";
2930
for (var metricKey in metricToDisplay) {
@@ -245,4 +246,4 @@ function addSourceRow(table, url) {
245246
sourceText.innerHTML = "API Source\: <a href='"+url+"'>"+url+"</a>";
246247
sourceRow.appendChild(sourceText);
247248
table.appendChild(sourceRow);
248-
}
249+
}

start/src/main/webapp/js/mpData.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ function getSystemMetrics() {
1717
var req = new XMLHttpRequest();
1818

1919
var metricToDisplay = {};
20-
metricToDisplay["application_getProperties_total"] = "Request Count";
21-
metricToDisplay["application_io_openliberty_sample_system_SystemResource_getPropertiesTime_one_min_rate_per_second"] = "Min Request Time (ms)";
22-
metricToDisplay["application_io_openliberty_sample_system_SystemResource_getPropertiesTime_mean_seconds"] = "Mean Request Time (ms)";
23-
metricToDisplay["application_io_openliberty_sample_system_SystemResource_getPropertiesTime_max_seconds"] = "Max Request Time (ms)";
24-
metricToDisplay["base_cpu_processCpuLoad_percent"] = "System CPU Usage (%)";
25-
metricToDisplay["base_memory_usedHeap_bytes"] = "System Heap Usage (MB)";
20+
var SRgetPropertiesTime = "io_openliberty_sample_system_SystemResource_getPropertiesTime";
21+
metricToDisplay["getProperties_total{mp_scope=\"application\",}"] = "Request Count";
22+
metricToDisplay[SRgetPropertiesTime + "_seconds{mp_scope=\"application\",quantile=\"0.999\",}"] = "Request Time (ms) at Quantile 0.999";
23+
metricToDisplay[SRgetPropertiesTime + "_seconds{mp_scope=\"application\",quantile=\"0.5\",}"] = "Request Time (ms) at Quantile 0.5";
24+
metricToDisplay[SRgetPropertiesTime + "_seconds_max{mp_scope=\"application\",}"] = "Max Request Time (ms)";
25+
metricToDisplay["cpu_processCpuLoad_percent{mp_scope=\"base\",}"] = "System CPU Usage (%)";
26+
metricToDisplay["memory_usedHeap_bytes{mp_scope=\"base\",}"] = "System Heap Usage (MB)";
2627

2728
var metricToMatch = "^(";
2829
for (var metricKey in metricToDisplay) {
@@ -239,4 +240,4 @@ function addSourceRow(table, url) {
239240
sourceText.innerHTML = "API Source\: <a href='"+url+"'>"+url+"</a>";
240241
sourceRow.appendChild(sourceText);
241242
table.appendChild(sourceRow);
242-
}
243+
}

0 commit comments

Comments
 (0)