<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Monitor; use Illuminate\Http\Request; use Illuminate\Support\Facades\Log; class ModStartMonitorMiddleware { public function handle(Request $gSoa2, \Closure $dHcaF) { goto lP_RJ; Xmd_x: if (defined('LARAVEL_START')) { goto f2ixn; XEvQz: $TG2we = $gSoa2->input(); goto OFbos; rgbL2: $Putcr = DatabaseMonitor::getQueryCountPerRequest(); goto OQzGx; f2ixn: $oWzL0 = round((microtime(true) - LARAVEL_START) * 1000, 2); goto XEvQz; csh36: if ($oWzL0 > 1000) { $pFM9U = json_encode($TG2we, JSON_UNESCAPED_UNICODE); Log::warning("LONG_REQUEST {$hiFdg} [{$iERFh}] {$oWzL0}ms {$pFM9U}"); } goto rgbL2; hr4II: $hiFdg = $gSoa2->method(); goto csh36; OFbos: $iERFh = $gSoa2->url(); goto hr4II; OQzGx: if ($Putcr > 10) { $pFM9U = json_encode($TG2we, JSON_UNESCAPED_UNICODE); Log::warning("MASS_REQUEST_SQL {$Putcr} {$hiFdg} [{$iERFh}] {$pFM9U} -> " . json_encode(DatabaseMonitor::getQueryCountPerRequestSqls())); } goto rWNvF; rWNvF: } goto j4Q3N; j4Q3N: return $HMP0x; goto tnPDZ; lP_RJ: $HMP0x = $dHcaF($gSoa2); goto Xmd_x; tnPDZ: } }