修复 Redis 监控,消耗 CPU 秒数超过 Integer 范围

pull/2/head
YunaiV 2022-01-24 07:55:06 +08:00
parent 7d0b381dff
commit 9d6a046939
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ public class InfRedisMonitorRespVO {
private Integer calls;
@ApiModelProperty(value = "消耗 CPU 秒数", required = true, example = "666")
private Integer usec;
private Long usec;
}

View File

@ -23,7 +23,7 @@ public interface RedisConvert {
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;