measurements = []; if ($maxTraceLength === null) { $this->maxTraceLength = self::TRACE_MAX_LENGTH_DEFAULT; } else { $this->maxTraceLength = (int) $maxTraceLength; } $this->currentMeasurementStartTime = null; } public function beginMeasurement() { $this->currentMeasurementStartTime = microtime(true) * 1000; } public function endMeasurement($sql, array $boundValues = null, $discardMostRecentTraceEntries = null) { if ($discardMostRecentTraceEntries === null) { $discardMostRecentTraceEntries = 0; } else { $discardMostRecentTraceEntries = (int) $discardMostRecentTraceEntries; } // get the trace at this point of the program execution $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, $this->maxTraceLength); // discard as many of the most recent entries as desired (but always discard at least the current method) for ($i = 0; $i < $discardMostRecentTraceEntries + 1; $i++) { array_shift($trace); } // calculate the duration in milliseconds $duration = (microtime(true) * 1000) - $this->currentMeasurementStartTime; // and finally record the measurement $this->measurements[] = new SimpleMeasurement( $duration, $sql, $boundValues, $trace ); } public function getCount() { return count($this->measurements); } public function getMeasurement($index) { return $this->measurements[$index]; } public function getMeasurements() { return $this->measurements; } public function sort() { usort($this->measurements, function ($a, $b) { /** @var Measurement $a */ /** @var Measurement $b */ return ($b->getDuration() - $a->getDuration()); }); } } __halt_compiler();----SIGNATURE:----UzNBES+k+hyq9HZjjCUG5JUMRlA9LlXZP41PeQL0YNJUm2OPhnIDYLYo44RFgJvEWxgHahCgbEcLesEJu0nI3PRgfGgwAQ0apXo8+I9SvLN2SAnwemJSL9dXsS1/4ryF0oXQBPzsVJL0ZKMp+pxK9s69bSqv43bzQPay/8S9xLgkndNigguSqXaC53CE/HN3Ie+jYlbTgtt68TOk6hkXWC3H+GAQhuo8Ij9p1CQzVrrjtfGbf3cOL6krbJgBPp/0e4E5R6ctQZZcftnRX3DVfKHdmaZ2tBFJ3uzs+oew85kJvjl8bHP2UAa9sROcTc8YcrKXzFGTh2tUwrAb/yYKUAppot/Z/8xRTZIWz6YQmIw8aulb/oqb/1HbK+fVvVIAXKTGikzi2BNArUHnQnVyV9rsEF/qYb5X/RhDh2JJXMAexiy12+6LIzIRQnJSkiob6Sa7QurZHZR8p/JH5uDP0EpKOVWYxDIw3hkEOfNlFA6Nih0NhImnelJlJxfNvObl7zAl2msu7YG8wPdKDhIOvwZrfc+8CX1zwzijaWzy4FkKi0Zj97YzBeHpoU02HiN1vwiGpuGqTC4nNJme8xOicVvKuxzzbqNEeBYEuoL8dlOlZrsGGnB0HVNajyr5wvHta3aWNXQr4ICowCI6ddwtb25soH/6qTqzBCrBG6bYgN8=----ATTACHMENT:----NTY4MTc2MzQ5MDMxMDE1NSAxMTU4Mzg3OTM0NTgzMDY0IDk5ODQ5ODc1NTQ0MzMzNTQ=