示例#1
0
 public function actionEcho()
 {
     Profiler::begin(__METHOD__);
     sleep(1);
     \Yii::info("liuyue test", "value");
     Profiler::end(__METHOD__);
     Profiler::log(__METHOD__);
 }
示例#2
0
 public function actionEcho()
 {
     Profiler::begin(__METHOD__);
     sleep(1);
     util\String::myEcho("hello world");
     \Yii::info("liuyue test", "value");
     Profiler::end(__METHOD__);
     Profiler::log(__METHOD__);
 }
示例#3
0
 public function afterAction($action, $result)
 {
     $key = $this->_getKey($action);
     Profiler::end($key);
     $timeCost = Profiler::time($key);
     Profiler::free($key);
     list($prefix, $actionInfo) = explode("\$", $key);
     $logKey = "Action Time Cost";
     $logMsg = "[action:{$actionInfo}][time(ms):{$timeCost}]";
     \Yii::info($logMsg, $logKey);
     return $result;
 }