Skip to content

Commit

Permalink
(docs): change the chinese comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Cat-Drink committed Oct 14, 2024
1 parent fb0fba3 commit 4845692
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ private JsonNode queryAgents(){
for (String value : iPv4addrSet.toArray(new String[0])) {
iPv4addrArray.add(value);
}
return objectMapper.createObjectNode().set("iPv4addr",iPv4addrArray);// IPV4地址
return objectMapper.createObjectNode().set("iPv4addr",iPv4addrArray);// iPv4
}
}
return objectMapper.createObjectNode();
}
public JsonNode queryAgentsInfo() {
ObjectMapper objectMapper = new ObjectMapper();
ArrayNode agentsInfo = objectMapper.createArrayNode();
JsonNode agents = queryAgents().get("iPv4addr"); // 获取全主机
JsonNode agents = queryAgents().get("iPv4addr"); // get all host

for(JsonNode agent:agents){
ObjectNode temp = objectMapper.createObjectNode();
Expand Down Expand Up @@ -237,7 +237,7 @@ public JsonNode queryAgentCpu(String iPv4addr){
.toLocalDateTime();
agentInfo.put("time", instant.toString());
for (JsonNode agent : agentCpus) {
agentInfo.put(agent.get("metric").get("cpuUsage").asText(), agent.get("value").get(1).asDouble()); // cpu 指标值
agentInfo.put(agent.get("metric").get("cpuUsage").asText(), agent.get("value").get(1).asDouble()); // cpu metric
}
return agentInfo;
}
Expand All @@ -262,7 +262,7 @@ public JsonNode queryAgentMemory(String iPv4addr){
.toLocalDateTime();
agentsInfo.put("time", instant.toString());
for (JsonNode agent : agentsMem) {
agentsInfo.put(agent.get("metric").get("memUsage").asText(), agent.get("value").get(1).asLong()); // mem
agentsInfo.put(agent.get("metric").get("memUsage").asText(), agent.get("value").get(1).asLong()); // mem metric
}
return agentsInfo;
}
Expand Down

0 comments on commit 4845692

Please sign in to comment.