<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Monitor; use Illuminate\Http\Request; use Illuminate\Support\Facades\Log; use ModStart\Core\Util\SerializeUtil; class ModStartMonitorMiddleware { public function handle(Request $fzeTQ, \Closure $ayFRd) { goto kN7WS; pSeQx: if (defined('LARAVEL_START')) { goto uVUTg; QVsTm: $DowdX = DatabaseMonitor::getQueryCountPerRequest(); goto t1J11; GcrbG: $fVu6a = $fzeTQ->method(); goto b1C46; uVUTg: $CoZv2 = round((microtime(true) - LARAVEL_START) * 1000, 2); goto OIEb7; XHcJR: $tpgiq = $fzeTQ->url(); goto GcrbG; b1C46: if ($CoZv2 > 1000) { $AXgEz = SerializeUtil::jsonEncode($sYsuI); Log::warning("LONG_REQUEST {$fVu6a} [{$tpgiq}] {$CoZv2}ms {$AXgEz}"); } goto QVsTm; OIEb7: $sYsuI = $fzeTQ->input(); goto XHcJR; t1J11: if ($DowdX > 10) { $AXgEz = SerializeUtil::jsonEncode($sYsuI); Log::warning("MASS_REQUEST_SQL {$DowdX} {$fVu6a} [{$tpgiq}] {$AXgEz} -> " . SerializeUtil::jsonEncode(DatabaseMonitor::getQueryCountPerRequestSqls())); } goto gU3Kf; gU3Kf: } goto jd9tI; kN7WS: $YD5di = $ayFRd($fzeTQ); goto pSeQx; jd9tI: return $YD5di; goto fJnUv; fJnUv: } }