16 @date_default_timezone_set(@date_default_timezone_get());
18 require_once
'../inc/hce_node_api.inc.php';
19 require_once
'../inc/search.ini.php';
25 echo
'Client ['.$Client_Identity.
'] conected, start to send '.
$MAX_QUERIES.
' message requests...'.PHP_EOL.PHP_EOL;
38 echo
'request message '.$i.
' ['.$Request_Id.
'] sent...'.PHP_EOL;
42 if($hce_responses[
'error']===0){
43 foreach($hce_responses[
'messages'] as $hce_message){
46 echo $hce_message[
'body'];
50 echo
'Message: id=['.$hce_message[
'id'].
'], body=['.$hce_message[
'body'].
']'.PHP_EOL;
53 echo var_export($rjson,
true).PHP_EOL;
60 if($hce_responses[
'error']==HCE_PROTOCOL_ERROR_TIMEOUT){
63 echo
'request timeout'.PHP_EOL;
67 echo
'request unknown error'.PHP_EOL;
79 echo PHP_EOL.
'Finished '.
$MAX_QUERIES.
' queries, '.(time()-$t).
' sec, '.floor(
$MAX_QUERIES/(time()-$t+0.00001)).
' rps, '.$Timedout.
' timedout'.PHP_EOL;
83 echo
'Connection create error '.$hce_connection[
'error'].PHP_EOL;
85 echo json_encode(array(
'data'=>array(
'match_info'=>array(),
'word_info'=>array(),
'doc_info'=>array())));