public function jobsPerSecond($conditions = [], $field = 'created', $time_range = '-1 hour') { $start_time = new Time($time_range); $current_time = new Time(); $second_count = $current_time->diffInSeconds($start_time); $conditions[$this->aliasField($field) . ' > '] = $start_time; $count = $this->find()->where($conditions)->count(); return $count / $second_count; }