mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 07:44:05 +02:00
SelectPaginationAdapter: add benchmark
This commit is contained in:
parent
7b9f90e978
commit
7780c0b11b
@ -2,6 +2,7 @@
|
||||
|
||||
namespace ipl\Db\Zf1;
|
||||
|
||||
use Icinga\Application\Benchmark;
|
||||
use ipl\Data\Paginatable;
|
||||
use Zend_Db_Select as ZfSelect;
|
||||
|
||||
@ -27,9 +28,13 @@ class SelectPaginationAdapter implements Paginatable
|
||||
|
||||
public function count()
|
||||
{
|
||||
return $this->query->getAdapter()->fetchOne(
|
||||
Benchmark::measure('Running count() for pagination');
|
||||
$count = $this->query->getAdapter()->fetchOne(
|
||||
$this->getCountQuery()
|
||||
);
|
||||
Benchmark::measure("Counted $count rows");
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function limit($count = null, $offset = null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user