修复 Redis 监控,消耗 CPU 秒数超过 Integer 范围
parent
7d0b381dff
commit
9d6a046939
|
@ -37,7 +37,7 @@ public class InfRedisMonitorRespVO {
|
||||||
private Integer calls;
|
private Integer calls;
|
||||||
|
|
||||||
@ApiModelProperty(value = "消耗 CPU 秒数", required = true, example = "666")
|
@ApiModelProperty(value = "消耗 CPU 秒数", required = true, example = "666")
|
||||||
private Integer usec;
|
private Long usec;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ public interface RedisConvert {
|
||||||
respVO.getCommandStats().add(InfRedisMonitorRespVO.CommandStat.builder()
|
respVO.getCommandStats().add(InfRedisMonitorRespVO.CommandStat.builder()
|
||||||
.command(StrUtil.subAfter((String) key, "cmdstat_", false))
|
.command(StrUtil.subAfter((String) key, "cmdstat_", false))
|
||||||
.calls(Integer.valueOf(StrUtil.subBetween((String) value, "calls=", ",")))
|
.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());
|
.build());
|
||||||
});
|
});
|
||||||
return respVO;
|
return respVO;
|
||||||
|
|
Loading…
Reference in New Issue