library/Rediska.php
public function getProfiler()
    {
        if (!$this->_profiler) {
            if (is_string($this->_options['profiler'])) {
                $this->_options['profiler'] = array(
                    'name' => $this->_options['profiler']
                );
            }

            if ($this->_options['profiler'] === false) {
                $this->_profiler = new Rediska_Profiler_Null();
            } else if ($this->_options['profiler'] === true) {
                $this->_profiler = new Rediska_Profiler();
            } else if (is_array($this->_options['profiler'])) {
                if (!isset($this->_options['profiler']['name'])) {
                    throw new Rediska_Exception("You must specify profiler 'name'.");
                } else if (in_array($this->_options['profiler']['name'], array('stream'))) {
                    $name = ucfirst($this->_options['profiler']['name']);
                    $className = "Rediska_Profiler_$name";
                    $options = $this->_options['profiler'];
                    unset($options['name']);
                    $this->_profiler = new $className($options);
                } else if (@class_exists($this->_options['profiler']['name'])) {
                    $className = $this->_options['profiler']['name'];
                    $options = $this->_options['profiler'];
                    unset($options['name']);
                    $this->_profiler = new $className($options);
                } else {
                    throw new Rediska_Exception("Profiler '{$this->_options['profiler']['name']}' not found. You need include it before or setup autoload.");
                }
            } elseif (is_object($this->_options['profiler'])) {
                $this->_profiler = $this->_options['profiler'];
            } else {
                throw new Rediska_Exception("Profiler option must be a boolean, object or array of options");
            }

            if (!$this->_profiler instanceof Rediska_Profiler_Interface) {
                $profilerClass = get_class($this->_profiler);
                throw new Rediska_Serializer_Exception("Profiler '$profilerClass' must implement Rediska_Profiler_Interface");
            }
        }

        return $this->_profiler;
    }
public function getProfiler()
    {
        if (!$this->_profiler) {
            if (is_string($this->_options['profiler'])) {
                $this->_options['profiler'] = array(
                    'name' => $this->_options['profiler']
                );
            }

            if ($this->_options['profiler'] === false) {
                $this->_profiler = new Rediska_Profiler_Null();
            } else if ($this->_options['profiler'] === true) {
                $this->_profiler = new Rediska_Profiler();
            } else if (is_array($this->_options['profiler'])) {
                if (!isset($this->_options['profiler']['name'])) {
                    throw new Rediska_Exception("You must specify profiler 'name'.");
                } else if (in_array($this->_options['profiler']['name'], array('stream'))) {
                    $name = ucfirst($this->_options['profiler']['name']);
                    $className = "Rediska_Profiler_$name";
                    $options = $this->_options['profiler'];
                    unset($options['name']);
                    $this->_profiler = new $className($options);
                } else if (@class_exists($this->_options['profiler']['name'])) {
                    $className = $this->_options['profiler']['name'];
                    $options = $this->_options['profiler'];
                    unset($options['name']);
                    $this->_profiler = new $className($options);
                } else {
                    throw new Rediska_Exception("Profiler '{$this->_options['profiler']['name']}' not found. You need include it before or setup autoload.");
                }
            } elseif (is_object($this->_options['profiler'])) {
                $this->_profiler = $this->_options['profiler'];
            } else {
                throw new Rediska_Exception("Profiler option must be a boolean, object or array of options");
            }

            if (!$this->_profiler instanceof Rediska_Profiler_Interface) {
                $profilerClass = get_class($this->_profiler);
                throw new Rediska_Serializer_Exception("Profiler '$profilerClass' must implement Rediska_Profiler_Interface");
            }
        }

        return $this->_profiler;
    }
Get profiler

@return Rediska_Profiler