< Summary

Class:DCL.SceneMetricsModel
Assembly:WorldRuntimeInterfaces
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WorldRuntime/Interfaces/SceneMetricsModel.cs
Covered lines:16
Uncovered lines:8
Coverable lines:24
Total lines:61
Line coverage:66.6% (16 of 24)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Clone()0%110100%
operator>(...)0%110100%
operator<(...)0%110100%
operator-(...)0%110100%
operator+(...)0%2100%
ToString()0%110100%

File(s)

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

#LineLine coverage
 1namespace DCL
 2{
 3    [System.Serializable]
 4    public class SceneMetricsModel
 5    {
 6        public int meshes;
 7        public int bodies;
 8        public int materials;
 9        public int textures;
 10        public int triangles;
 11        public int entities;
 12        public float sceneHeight;
 13
 80714        public SceneMetricsModel Clone() { return (SceneMetricsModel) MemberwiseClone(); }
 15
 16        public static bool operator >(SceneMetricsModel lhs, SceneMetricsModel rhs)
 17        {
 26618            int lhsValue = lhs.meshes + lhs.bodies + lhs.materials + lhs.textures + lhs.triangles + lhs.entities;
 26619            int rhsValue = rhs.meshes + rhs.bodies + rhs.materials + rhs.textures + rhs.triangles + rhs.entities;
 20
 26621            return lhsValue > rhsValue;
 22        }
 23
 24        public static bool operator <(SceneMetricsModel lhs, SceneMetricsModel rhs)
 25        {
 126            int lhsValue = lhs.meshes + lhs.bodies + lhs.materials + lhs.textures + lhs.triangles + lhs.entities;
 127            int rhsValue = rhs.meshes + rhs.bodies + rhs.materials + rhs.textures + rhs.triangles + rhs.entities;
 28
 129            return lhsValue < rhsValue;
 30        }
 31
 32        public static SceneMetricsModel operator -(SceneMetricsModel lhs, SceneMetricsModel rhs)
 33        {
 134            SceneMetricsModel result = lhs.Clone();
 135            result.bodies -= rhs.bodies;
 136            result.entities -= rhs.entities;
 137            result.materials -= rhs.materials;
 138            result.textures -= rhs.textures;
 139            result.meshes -= rhs.meshes;
 140            result.triangles -= rhs.triangles;
 141            return result;
 42        }
 43
 44        public static SceneMetricsModel operator +(SceneMetricsModel lhs, SceneMetricsModel rhs)
 45        {
 046            SceneMetricsModel result = lhs.Clone();
 047            result.bodies += rhs.bodies;
 048            result.entities += rhs.entities;
 049            result.materials += rhs.materials;
 050            result.textures += rhs.textures;
 051            result.meshes += rhs.meshes;
 052            result.triangles += rhs.triangles;
 053            return result;
 54        }
 55
 56        public override string ToString()
 57        {
 26758            return $"Textures: {textures} - Triangles: {triangles} - Materials: {materials} - Meshes: {meshes} - Bodies:
 59        }
 60    }
 61}