Skip to content

Commit 658beab

Browse files
authored
Merge pull request #693 from bytedance/feat-jvm-metric
modify discard_count to discard_send
2 parents ef6ae54 + 92338d4 commit 658beab

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

rasp/jvm/JVMProbe/src/main/java/com/security/smith/SmithProbe.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1316,9 +1316,9 @@ public Heartbeat getHeartbeat() {
13161316
}
13171317

13181318
public void addDisacrdCount() {
1319-
int discrad_count = this.heartbeat.getDiscardCount();
1319+
int discrad_count = this.heartbeat.getDiscardSend();
13201320
discrad_count++;
1321-
this.heartbeat.setDiscardCount(discrad_count);
1321+
this.heartbeat.setDiscardSend(discrad_count);
13221322
}
13231323

13241324
public Map<Pair<Integer, Integer>, Integer> getLimits() {

rasp/jvm/JVMProbe/src/main/java/com/security/smith/client/message/Heartbeat.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class Heartbeat {
1212
private String patch;
1313
private String class_filter_version;
1414
private String switches;
15-
private int discard_count;
15+
private int discard_send;
1616

1717
public Heartbeat() {
1818
filter = "";
@@ -21,7 +21,7 @@ public Heartbeat() {
2121
patch = "";
2222
class_filter_version = "";
2323
switches = "";
24-
discard_count = 0;
24+
discard_send = 0;
2525
}
2626

2727
public String getFilter() {
@@ -72,12 +72,12 @@ public void setSwitches(String switches) {
7272
this.switches = switches;
7373
}
7474

75-
public synchronized int getDiscardCount() {
76-
return discard_count;
75+
public synchronized int getDiscardSend() {
76+
return discard_send;
7777
}
7878

79-
public synchronized void setDiscardCount(int discard_count) {
80-
this.discard_count = discard_count;
79+
public synchronized void setDiscardSend(int discard_send) {
80+
this.discard_send = discard_send;
8181
}
8282

8383
public static Heartbeat fromJson(String json) {

0 commit comments

Comments
 (0)