<?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 $hoJyG, \Closure $dkWaY) { goto v7ztX; WjWsK: if (defined('LARAVEL_START')) { goto G935i; zh06r: $pK00s = $hoJyG->method(); goto Pnhs5; qctMo: $vrSVj = $hoJyG->input(); goto vkf04; vkf04: $ik1Qg = $hoJyG->url(); goto zh06r; G935i: $vQlXM = round((microtime(true) - LARAVEL_START) * 1000, 2); goto qctMo; Pnhs5: if ($vQlXM > 1000) { $ACVUe = SerializeUtil::jsonEncode($vrSVj); Log::warning("LONG_REQUEST {$pK00s} [{$ik1Qg}] {$vQlXM}ms {$ACVUe}"); } goto HwdRE; HwdRE: $Z_RvH = DatabaseMonitor::getQueryCountPerRequest(); goto NO_1w; NO_1w: if ($Z_RvH > 10) { $ACVUe = SerializeUtil::jsonEncode($vrSVj); Log::warning("MASS_REQUEST_SQL {$Z_RvH} {$pK00s} [{$ik1Qg}] {$ACVUe} -> " . SerializeUtil::jsonEncode(DatabaseMonitor::getQueryCountPerRequestSqls())); } goto YDdiJ; YDdiJ: } goto tSRpr; v7ztX: $FqOmX = $dkWaY($hoJyG); goto WjWsK; tSRpr: return $FqOmX; goto ZTrXi; ZTrXi: } }