实时统计 QPS

可以利用Redis, 每次访问时添加一个Redis操作

incr Ymdhis

将键名 Ymdhis 过期时间设置为1s

EXPIRE Ymdhis 1

需要查看 QPS 时,查看 Ymdhis 值即可

get Ymdhis