Skip to content

Commit

Permalink
修复 Redis 监控,消耗 CPU 秒数超过 Integer 范围
Browse files Browse the repository at this point in the history
  • Loading branch information
YunaiV committed Jan 23, 2022
1 parent 7d0b381 commit 9d6a046
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static class CommandStat {
private Integer calls;

@ApiModelProperty(value = "消耗 CPU 秒数", required = true, example = "666")
private Integer usec;
private Long usec;

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ default InfRedisMonitorRespVO build(Properties info, Long dbSize, Properties com
respVO.getCommandStats().add(InfRedisMonitorRespVO.CommandStat.builder()
.command(StrUtil.subAfter((String) key, "cmdstat_", false))
.calls(Integer.valueOf(StrUtil.subBetween((String) value, "calls=", ",")))
.usec(Integer.valueOf(StrUtil.subBetween((String) value, "usec=", ",")))
.usec(Long.valueOf(StrUtil.subBetween((String) value, "usec=", ",")))
.build());
});
return respVO;
Expand Down

0 comments on commit 9d6a046

Please sign in to comment.