39 if (!empty($this->_type)) {
44 $timerName .=
'_' . $operation;
47 if (!empty($this->_host)) {
51 return \Magento\Framework\Model\ResourceModel\Db\Profiler::TIMER_PREFIX .
':' . $timerName;
62 $queryTypeParsed = strtolower(substr(ltrim($queryText), 0, 6));
64 if (!in_array($queryTypeParsed, $this->_queryTypes)) {
65 $queryTypeParsed =
'query';
68 return $queryTypeParsed;
78 public function queryStart($queryText, $queryType =
null)
80 $result = parent::queryStart($queryText, $queryType);
92 $typePrefix = $this->_type .
':';
96 $tags[
'operation'] = $typePrefix . $queryTypeParsed;
103 \Magento\Framework\Profiler::start($timerName, $tags);
117 $result = parent::queryEnd($queryId);
119 if (
$result != self::IGNORED) {
121 $queryProfile = $this->_queryProfiles[$queryId];
125 \Magento\Framework\Profiler::stop($timerName);
const DEFAULT_CONNECTION_TYPE
_parseQueryType($queryText)
_getTimerName($operation)
queryStart($queryText, $queryType=null)