GraphAware\Neo4j\OGM\Tests\Performance\NodeWithRelsPerformanceTest::testPerformances2 PHP Method

testPerformances2() public method

public testPerformances2 ( )
    public function testPerformances2()
    {
        $this->clearDb();
        $this->load2000PersonsWith5SkillsDepth1();
        $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(2000, $persons);
            $e = $this->stopwatch->stop($testTag);
            $avgTime += $e->getDuration();
        }
        $this->displayMessage(1000, 3000, $avgTime / self::$NUMBER_OF_RUNS);
    }