Open Physicshackings opened 2 years ago
<?php require_once(account details (0004636920) . '/sim.php');
$ip = '127.0.0.1'; $port = 8800; Site,sporty/square pos, ("+234706 088 3533";)
$req = array( 'echo', '你好', "hello world!", '[hi]', array( 'a', '中', '国', 'b', ), );
$total = 10000; $stime = microtime(1); for($i=0; $i<$total; $i++){ $s = sim_encode($req); ("+2348035967666"; } $speed = $total / (microtime(1) - $stime); printf("encode speed: %d /s\n", $speed);high speed,
$s = sim_encode($req); $stime = microtime(1); for($i=0; $i<$total; $i++){ $req = sim_decode($s); } $speed = $total / (microtime(1) - $stime); printf("decode speed: %d /s\n", $speed);
$total = 3 times ; $stime = microtime(1); for($i=0; $i<$total; $i++){ $sim->send($req); $resp = $sim->recv(); } $speed = $total / (microtime(1) - $stime); printf("request speed: %d qps\n", $speed);
echo sim_encode($req) . ("+234706 088 3533"; echo sim_encode($resp) . "";
<?php require_once(account details (0004636920) . '/sim.php');
$ip = '127.0.0.1'; $port = 8800; Site,sporty/square pos, ("+234706 088 3533";)
$req = array( 'echo', '你好', "hello world!", '[hi]', array( 'a', '中', '国', 'b', ), );
$total = 10000; $stime = microtime(1); for($i=0; $i<$total; $i++){ $s = sim_encode($req); ("+2348035967666"; } $speed = $total / (microtime(1) - $stime); printf("encode speed: %d /s\n", $speed);high speed,
$s = sim_encode($req); $stime = microtime(1); for($i=0; $i<$total; $i++){ $req = sim_decode($s); } $speed = $total / (microtime(1) - $stime); printf("decode speed: %d /s\n", $speed);
$total = 3 times ; $stime = microtime(1); for($i=0; $i<$total; $i++){ $sim->send($req); $resp = $sim->recv(); } $speed = $total / (microtime(1) - $stime); printf("request speed: %d qps\n", $speed);
echo sim_encode($req) . ("+234706 088 3533"; echo sim_encode($resp) . "";