diff options
| author | wangkuan <[email protected]> | 2024-02-21 09:45:53 +0800 |
|---|---|---|
| committer | wangkuan <[email protected]> | 2024-02-21 09:45:53 +0800 |
| commit | 5589e5c0fbf893e559cc291b69a7881c96b7df77 (patch) | |
| tree | 95afc94303c191cc041b40f4090906b8f74731b5 | |
| parent | f0c8b24fefaaa9d5567120a95c62290b7a909792 (diff) | |
[feature][core]计数器增加自定义数值的metrics输出方法
| -rw-r--r-- | groot-core/src/main/java/com/geedgenetworks/core/metrics/InternalMetrics.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/groot-core/src/main/java/com/geedgenetworks/core/metrics/InternalMetrics.java b/groot-core/src/main/java/com/geedgenetworks/core/metrics/InternalMetrics.java index ff68845..0bd3cc2 100644 --- a/groot-core/src/main/java/com/geedgenetworks/core/metrics/InternalMetrics.java +++ b/groot-core/src/main/java/com/geedgenetworks/core/metrics/InternalMetrics.java @@ -26,19 +26,27 @@ public class InternalMetrics { public void incrementErrorEvents() { errorEvents.inc(); } - public void incrementDroppedEvents() { droppedEvents.inc(); } - public void incrementInEvents() { inEvents.inc(); } - public void incrementOutEvents() { outEvents.inc(); } - + public void incrementErrorEvents(long num) { + errorEvents.inc(num); + } + public void incrementDroppedEvents(long num) { + droppedEvents.inc(num); + } + public void incrementInEvents(long num) { + inEvents.inc(num); + } + public void incrementOutEvents(long num) { + outEvents.inc(num); + } public void incrementInBytes(long bytes) { inBytes.inc(bytes); } |
