You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/01/12 15:11:02 UTC

[skywalking-java] branch main updated: Follow protocol grammar fix `GCPhrase -> GCPhase` (#90)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git


The following commit(s) were added to refs/heads/main by this push:
     new 7b160b5  Follow protocol grammar fix `GCPhrase -> GCPhase` (#90)
7b160b5 is described below

commit 7b160b5fec6060f69e1ccb764d55cdb0a6d80c29
Author: 吴晟 Wu Sheng <wu...@foxmail.com>
AuthorDate: Wed Jan 12 23:10:58 2022 +0800

    Follow protocol grammar fix `GCPhrase -> GCPhase` (#90)
---
 CHANGES.md                                                     |  1 +
 apm-protocol/apm-network/src/main/proto                        |  2 +-
 .../org/apache/skywalking/apm/agent/core/jvm/gc/GCModule.java  | 10 +++++-----
 .../org/apache/skywalking/apm/agent/core/jvm/gc/UnknowGC.java  |  6 +++---
 4 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 94a86e8..25620b7 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -19,6 +19,7 @@ Release Notes.
 * Add support `returnedObj` expression for apm-customize-enhance-plugin
 * Fix the bug that httpasyncclient-4.x-plugin  puts the dirty tracing context in the connection context
 * Compatible with the versions after dubbo-2.7.14
+* Follow protocol grammar fix `GCPhrase -> GCPhase`.
 
 #### Documentation
 
diff --git a/apm-protocol/apm-network/src/main/proto b/apm-protocol/apm-network/src/main/proto
index e626ee0..667134d 160000
--- a/apm-protocol/apm-network/src/main/proto
+++ b/apm-protocol/apm-network/src/main/proto
@@ -1 +1 @@
-Subproject commit e626ee04850703c220f64b642d2893fa65572943
+Subproject commit 667134d08ffd63122062971d320c34e7e10a7c9e
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/jvm/gc/GCModule.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/jvm/gc/GCModule.java
index a4cd667..f4547c4 100644
--- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/jvm/gc/GCModule.java
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/jvm/gc/GCModule.java
@@ -22,7 +22,7 @@ import java.lang.management.GarbageCollectorMXBean;
 import java.util.LinkedList;
 import java.util.List;
 import org.apache.skywalking.apm.network.language.agent.v3.GC;
-import org.apache.skywalking.apm.network.language.agent.v3.GCPhrase;
+import org.apache.skywalking.apm.network.language.agent.v3.GCPhase;
 
 public abstract class GCModule implements GCMetricAccessor {
     private List<GarbageCollectorMXBean> beans;
@@ -41,11 +41,11 @@ public abstract class GCModule implements GCMetricAccessor {
         List<GC> gcList = new LinkedList<GC>();
         for (GarbageCollectorMXBean bean : beans) {
             String name = bean.getName();
-            GCPhrase phrase;
+            GCPhase phase;
             long gcCount = 0;
             long gcTime = 0;
             if (name.equals(getNewGCName())) {
-                phrase = GCPhrase.NEW;
+                phase = GCPhase.NEW;
                 long collectionCount = bean.getCollectionCount();
                 gcCount = collectionCount - lastYGCCount;
                 lastYGCCount = collectionCount;
@@ -54,7 +54,7 @@ public abstract class GCModule implements GCMetricAccessor {
                 gcTime = time - lastYGCCollectionTime;
                 lastYGCCollectionTime = time;
             } else if (name.equals(getOldGCName())) {
-                phrase = GCPhrase.OLD;
+                phase = GCPhase.OLD;
                 long collectionCount = bean.getCollectionCount();
                 gcCount = collectionCount - lastOGCCount;
                 lastOGCCount = collectionCount;
@@ -66,7 +66,7 @@ public abstract class GCModule implements GCMetricAccessor {
                 continue;
             }
 
-            gcList.add(GC.newBuilder().setPhrase(phrase).setCount(gcCount).setTime(gcTime).build());
+            gcList.add(GC.newBuilder().setPhase(phase).setCount(gcCount).setTime(gcTime).build());
         }
 
         return gcList;
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/jvm/gc/UnknowGC.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/jvm/gc/UnknowGC.java
index f7c617e..090c093 100644
--- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/jvm/gc/UnknowGC.java
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/jvm/gc/UnknowGC.java
@@ -21,14 +21,14 @@ package org.apache.skywalking.apm.agent.core.jvm.gc;
 import java.util.LinkedList;
 import java.util.List;
 import org.apache.skywalking.apm.network.language.agent.v3.GC;
-import org.apache.skywalking.apm.network.language.agent.v3.GCPhrase;
+import org.apache.skywalking.apm.network.language.agent.v3.GCPhase;
 
 public class UnknowGC implements GCMetricAccessor {
     @Override
     public List<GC> getGCList() {
         List<GC> gcList = new LinkedList<GC>();
-        gcList.add(GC.newBuilder().setPhrase(GCPhrase.NEW).build());
-        gcList.add(GC.newBuilder().setPhrase(GCPhrase.OLD).build());
+        gcList.add(GC.newBuilder().setPhase(GCPhase.NEW).build());
+        gcList.add(GC.newBuilder().setPhase(GCPhase.OLD).build());
         return gcList;
     }
 }