ab测试高并发

时间:2021-01-01 17:58:39
ab测试高并发

Write here... 


<?php $store=5;
$redis=new Redis();
$result=$redis->connect('127.0.0.1',6379);
$res=$redis->llen('goods_store');

$count=$store-$res;
if($count===0){
    echo '秒杀已经结束';
}else{
    $redis->lpush('goods_store',1);
}
echo $redis->llen('goods_store');
?>