GraphAware\Neo4j\OGM\Tests\Performance\NodeWithRelsPerformanceTest::testPerformances1 PHP Метод

testPerformances1() публичный Метод

public testPerformances1 ( )
    public function testPerformances1()
    {
        $this->clearDb();
        $this->load1000PersonsWith3000RelsDepth1();
        $personsRepository = $this->em->getRepository(Person::class);
        $avgTime = 0;
        for ($i = 1; $i < self::$NUMBER_OF_RUNS; ++$i) {
            $testTag = 'run' . $i;
            $this->stopwatch->start($testTag);
            $persons = $personsRepository->findAll();
            $this->assertCount(1000, $persons);
            $e = $this->stopwatch->stop($testTag);
            $avgTime += $e->getDuration();
        }
        $this->displayMessage(1000, 3000, $avgTime / self::$NUMBER_OF_RUNS);
    }