function test_benchmark($arr_cfg)
{
    $time_start = microtime(true);
    $arr_return = array();
    $arr_return['version'] = '1.0';
    $arr_return['sysinfo']['time'] = date("Y-m-d H:i:s");
    $arr_return['sysinfo']['php_version'] = PHP_VERSION;
    $arr_return['sysinfo']['platform'] = PHP_OS;
    $arr_return['sysinfo']['server_name'] = $_SERVER['SERVER_NAME'];
    $arr_return['sysinfo']['server_addr'] = $_SERVER['SERVER_ADDR'];
    test_math($arr_return);
    test_string($arr_return);
    test_loops($arr_return);
    test_ifelse($arr_return);
    if (isset($arr_cfg['db.host'])) {
        test_mysql($arr_return, $arr_cfg);
    }
    $arr_return['total'] = timer_diff($time_start);
    return $arr_return;
}
Beispiel #2
0
function test_benchmark($settings)
{
    $timeStart = microtime(true);
    $result = array();
    $result['version'] = '1.1';
    $result['sysinfo']['time'] = date("Y-m-d H:i:s");
    $result['sysinfo']['php_version'] = PHP_VERSION;
    $result['sysinfo']['platform'] = PHP_OS;
    $result['sysinfo']['server_name'] = $_SERVER['SERVER_NAME'];
    $result['sysinfo']['server_addr'] = $_SERVER['SERVER_ADDR'];
    test_math($result);
    test_string($result);
    test_loops($result);
    test_ifelse($result);
    if (isset($settings['db.host'])) {
        test_mysql($result, $settings);
        test_mysqli($result, $settings);
    }
    $result['total'] = timer_diff($timeStart);
    return $result;
}
Beispiel #3
0
 echo '<td>' . $rek["id_Barcode"] . '</td>';
 echo '<td>' . $rek["brand"] . '</td>';
 echo '<td>' . $rek["name"] . '</td>';
 echo '<td>' . $rek["pn"] . '.</td>';
 echo '<td>1</td></b>';
 //echo '<td>'.$rek["sum_weight"].'</td>';
 // echo '<td>'.$rek["Name_sub"].'</td>';
 echo '</tr>';
 //}
 while ($rek_test = mysql_fetch_array($result, MYSQL_BOTH)) {
     echo '<tr><i><td colspan="2">Test NR:' . $rek_test['id_test'] . '</td><td>Reinstallation:' . test_string($rek_test["Reinstallation_id_reinst"]) . '</td>';
     echo '<td>Formatted:' . test_string($rek_test["Formatted_id_form"]) . '</td>';
     echo '<td>PAT:' . test_string($rek_test["Pat_id_pat"]) . '</td>';
     echo '<td>Cleaning:' . test_string($rek_test["Cleaning_id_clean"]) . '</td>';
     echo '<td>Functionality:' . test_string($rek_test["Functional_id_fun"]) . '</td>';
     echo '<td>Fuse Fitted:' . test_string($rek_test["Fuse_id_fuse"]) . '.</td>';
     echo '<td>RDY:' . $rek_test['Ready'] . '</td>';
     //echo '<td>'.$rek["sum_weight"].'</td>';
     // echo '<td>'.$rek["Name_sub"].'</td>';
     echo '</i></tr>';
 }
 /*
  while($rek_test=mysql_fetch_array($result,MYSQL_BOTH))
 {
    echo '<tr><i><td colspan=2>Test NR:'.$rek_test['id_test'].'</td><td  colspan=5> REI: '.test_string($rek_test["Reinstallation_id_reinst"]).' '; 
 	 echo '    FRM: '.test_string($rek_test["Formatted_id_form"]).'';
 echo '    PAT: '.test_string($rek_test["Pat_id_pat"]).'';
 	 echo '    CLN: '.test_string($rek_test["Cleaning_id_clean"]).'';
 	 echo '    FUN: '.test_string($rek_test["Functional_id_fun"]).'';
 	   echo '  FUSE: '.test_string($rek_test["Fuse_id_fuse"]).'';
      	echo '   RDY: '.$rek_test['Ready'].'</td>';
Beispiel #4
0
for ($z = 0; $z <= 1000; $z++) {
    $tab[$z] = 0;
}
while ($rek = mysql_fetch_array($result, 1)) {
    $i++;
    // if($tab[$rek["id_test"]]<'1')
    //{
    echo '<tr><td>' . $rek["id_test"] . '</td><td>' . $rek["Barcode"] . '</td>';
    echo '<td>' . $rek["Item_id_item"] . '</td>';
    echo '<td>' . $rek["brand"] . '</td>';
    echo '<td>' . $rek["name"] . '</td>';
    echo '<td>' . test_string($rek["Pat_id_pat"]) . '</td>';
    echo '<td>' . test_string($rek["Functional_id_fun"]) . '</td>';
    echo '<td>' . test_string($rek["Cleaning_id_clean"]) . '</td>';
    echo '<td>' . test_string($rek["Visual_id_visual"]) . '</td>';
    echo '<td>' . test_string($rek["Ready"]) . '</td>';
    echo '<td>' . $rek["date"] . '</td>';
    echo '</tr>';
    //}
    //  $tab[$rek["id_test"]]+=1;
}
?>
<tr>


<td>

</td>

<td>
Beispiel #5
0
     } else {
         echo "Not tested";
     }
 }
 echo "</td><td>";
 echo test_string($rek_sql[1]);
 echo "</td><td>";
 echo test_string($rek_sql[2]);
 echo "</td><td>";
 echo test_string($rek_sql[5]);
 echo "</td><td>";
 echo test_string($rek_sql[6]);
 echo "</td><td>";
 echo test_string($rek_sql[7]);
 echo "</td><td>";
 echo test_string($rek_sql[8]);
 echo "</td>";
 if ($METER_READING_FL == 1) {
     echo "<td>";
     echo draw($rek_sql[13]);
     echo "</td>";
     echo "<td>";
     echo draw($rek_sql[15]);
     echo "</td>";
     echo "<td>";
     echo draw($rek_sql[16]);
     echo "</td>";
 }
 echo "<td>";
 $sql = "SELECT * FROM user_2 WHERE id_user='******'";
 $res_sql = mysql_query($sql);
Beispiel #6
0
test_hh_bool(true);
test_hh_resource(STDIN);
test_hh_arraykey('herp');
test_hh_arraykey(123);
test_hh_num(123);
test_hh_num(1.23);
test_string(new string());
test_int(new int());
test_float(new float());
test_bool(new bool());
test_resource(new resource());
test_arraykey(new arraykey());
test_num(new num());
print "--- INCORRECT USAGE ---\n";
test_hh_string(new string());
test_hh_int(new int());
test_hh_float(new float());
test_hh_bool(new bool());
test_hh_resource(new resource());
test_hh_arraykey(new arraykey());
test_hh_arraykey(1.23);
test_hh_num(new num());
test_hh_num('123');
test_string('123');
test_int(123);
test_float(1.23);
test_bool(true);
test_resource(STDIN);
test_arraykey('herp');
test_arraykey(123);
test_num(1.23);
Beispiel #7
0
test_bool(true);
test_resource(STDIN);
test_arraykey('herp');
test_arraykey(123);
test_num(123);
test_num(1.23);
print "--- INCORRECT USAGE ---\n";
test_string(new string());
test_int(new int());
test_float(new float());
test_bool(new bool());
test_resource(new resource());
test_arraykey(new arraykey());
test_num(new num());
print "--- INCORRECT USAGE ---\n";
test_hh_string(new string());
test_hh_int(new int());
test_hh_float(new float());
test_hh_bool(new bool());
test_hh_resource(new resource());
test_hh_arraykey(new arraykey());
test_hh_arraykey(1.23);
test_hh_num(new num());
test_hh_num('123');
test_string(new string());
test_int(new int());
test_float(new float());
test_bool(new bool());
test_resource(new resource());
test_arraykey(new arraykey());
test_num(new num());