< Summary

Class:DCL.PoolManagerFactory
Assembly:MainScripts
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WorldRuntime/PoolManagerFactory.cs
Covered lines:6
Uncovered lines:1
Coverable lines:7
Total lines:21
Line coverage:85.7% (6 of 7)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
EnsureEntityPool(...)0%3.033085.71%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WorldRuntime/PoolManagerFactory.cs

#LineLine coverage
 1using UnityEngine;
 2
 3namespace DCL
 4{
 5    public static class PoolManagerFactory
 6    {
 7        public const string EMPTY_GO_POOL_NAME = "Empty";
 8
 9        public static void EnsureEntityPool(bool prewarm) // TODO: Move to PoolManagerFactory
 10        {
 58311            if (PoolManager.i.ContainsPool(EMPTY_GO_POOL_NAME))
 28612                return;
 13
 29714            GameObject go = new GameObject();
 29715            Pool pool = PoolManager.i.AddPool(EMPTY_GO_POOL_NAME, go, maxPrewarmCount: 1000, isPersistent: true);
 16
 29717            if (prewarm)
 018                pool.ForcePrewarm();
 29719        }
 20    }
 21}