[java-identity-provider] branch main updated: IDP-1794 - Memory metrics missing max heap gauge

Scott Cantor cantor.2 at osu.edu
Mon Apr 12 17:35:51 UTC 2021


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=b657b525bd9d530f6b8315e8f7b162d713711d52

The following commit(s) were added to refs/heads/main by this push:
       new  b657b525b IDP-1794 - Memory metrics missing max heap gauge
b657b525b is described below

commit b657b525bd9d530f6b8315e8f7b162d713711d52
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Apr 12 13:35:47 2021 -0400

    IDP-1794 - Memory metrics missing max heap gauge
    
    https://issues.shibboleth.net/jira/browse/IDP-1794
---
 .../net/shibboleth/idp/metrics/impl/CoreGaugeSet.java    | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/idp-core/src/main/java/net/shibboleth/idp/metrics/impl/CoreGaugeSet.java b/idp-core/src/main/java/net/shibboleth/idp/metrics/impl/CoreGaugeSet.java
index 1fbeb7cc8..58fbfee80 100644
--- a/idp-core/src/main/java/net/shibboleth/idp/metrics/impl/CoreGaugeSet.java
+++ b/idp-core/src/main/java/net/shibboleth/idp/metrics/impl/CoreGaugeSet.java
@@ -163,6 +163,22 @@ public class CoreGaugeSet implements MetricSet, MetricFilter {
                     }
                 });
 
+        gauges.put(
+                "memory.max.bytes",
+                new Gauge<Long>() {
+                    public Long getValue() {
+                        return Runtime.getRuntime().maxMemory();
+                    }
+                });
+
+        gauges.put(
+                "memory.max.megs",
+                new Gauge<Long>() {
+                    public Long getValue() {
+                        return Runtime.getRuntime().maxMemory() / (1024 * 1024);
+                    }
+                });
+
         gauges.put(
                 "memory.usage",
                 new RatioGauge() {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list