Browse Source

添加性能log

visuddhinanda 4 years ago
parent
commit
a08810b4c9
4 changed files with 11 additions and 2 deletions
  1. 2 0
      app/studio/dict_find_auto.php
  2. 4 1
      app/studio/dict_find_one.php
  3. 2 1
      app/uwbw/create_wbw.php
  4. 3 0
      app/uwbw/update.php

+ 2 - 0
app/studio/dict_find_auto.php

@@ -1,4 +1,5 @@
 <?php
+include("../log/pref_log.php");
 require_once "../path.php";
 require_once "../public/_pdo.php";
 require_once "../public/function.php";
@@ -515,3 +516,4 @@ if ($debug) {
     $queryTime = (microtime_float() - $time_start) * 1000;
     echo "<div >搜索时间:$queryTime 毫秒</div>";
 }
+PrefLog();

+ 4 - 1
app/studio/dict_find_one.php

@@ -1,4 +1,5 @@
 <?php
+include("../log/pref_log.php");
 require_once "../path.php";
 require_once "../public/_pdo.php";
 require_once "../public/function.php";
@@ -235,7 +236,6 @@ for ($i = 0; $i < $lookup_loop; $i++) {
 
 		
 
-        //$Fetch = PDO_FetchAll($query);
         $iFetch = count($Fetch);
         if ($debug) {
             echo "count:$iFetch<br>";
@@ -409,3 +409,6 @@ if ($debug) {
     $queryTime = (microtime_float() - $time_start) * 1000;
     echo "<div >搜索时间:$queryTime 毫秒</div>";
 }
+
+
+PrefLog();

+ 2 - 1
app/uwbw/create_wbw.php

@@ -1,6 +1,7 @@
 <?php
 //工程文件操作
 //建立,
+include("../log/pref_log.php");
 require_once '../path.php';
 require_once "../public/_pdo.php";
 require_once "../public/function.php";
@@ -271,5 +272,5 @@ foreach ($_para as $key => $para) {
 
 */
 echo json_encode($output, JSON_UNESCAPED_UNICODE);
-
+PrefLog();
 ?>

+ 3 - 0
app/uwbw/update.php

@@ -2,6 +2,7 @@
 /*
 get xml doc from db
  */
+include("../log/pref_log.php");
 require_once "../path.php";
 require_once "../public/_pdo.php";
 require_once "../public/function.php";
@@ -113,3 +114,5 @@ if (count($aData) > 0) {
     $respond['message'] = "no data";
     echo json_encode($respond, JSON_UNESCAPED_UNICODE);
 }
+
+PrefLog();