stanley-king 3 gadi atpakaļ
vecāks
revīzija
87054f1ab7
1 mainītis faili ar 4 papildinājumiem un 3 dzēšanām
  1. 4 3
      helper/refill/RefillBase.php

+ 4 - 3
helper/refill/RefillBase.php

@@ -350,11 +350,12 @@ class RefillBase
             try
             {
                 if($fTrans) {
-                    $trans = new trans_wapper($mod_refill,'RefillBase::add');
+                    $trans = new trans_wapper($mod_refill,__METHOD__);
+                } else {
+                    $start = microtime(true);
                 }
 
                 $result = $logic_buy_virtual->buyStep3($input, $buyer_id, [$calc, 'calc_vorder_amount'], true,false);
-
                 if ($result['state'] === true)
                 {
                     $order_sn = $result['data']['order_sn'];
@@ -414,7 +415,7 @@ class RefillBase
                         $trans->commit();
                     }
                     else {
-
+                        Log::record(sprintf(__METHOD__ . "request time=%.6f", microtime(true) - $start), Log::DEBUG);
                     }
                 }
                 else {