/** * @see parent::getProps() */ function getProps() { $props = parent::getProps(); $props["datasource"] = "str notNull"; $props["period"] = "dateTime notNull"; $props["requests"] = "num"; $props["duration"] = "float"; $props["aggregate"] = "num min|0 default|10"; $props["bot"] = "enum list|0|1 default|0"; $props['module_action_id'] = "ref notNull class|CModuleAction"; $props["_module"] = "str"; $props["_action"] = "str"; return $props; }
/** * @see parent::updateFormFields() */ function updateFormFields() { parent::updateFormFields(); if ($this->hits) { $this->_average_duration = $this->duration / $this->hits; //$this->_average_session_wait = $this->session_wait / $this->hits; //$this->_average_session_read = $this->session_read / $this->hits; $this->_average_duration = $this->duration / $this->hits; $this->_average_processus = $this->processus / $this->hits; $this->_average_processor = $this->processor / $this->hits; $this->_average_request = $this->request / $this->hits; $this->_average_nb_requests = $this->nb_requests / $this->hits; $this->_average_peak_memory = $this->peak_memory / $this->hits; $this->_average_errors = $this->errors / $this->hits; $this->_average_warnings = $this->warnings / $this->hits; $this->_average_notices = $this->notices / $this->hits; } // If time period == 1 hour $this->_average_hits = $this->hits / 60; // hits per min $this->_average_size = $this->size / 3600; // size per sec }