< Summary

Class:GDX.Developer.ConsoleCommands.GarbageCollectionConsoleCommand
Assembly:GDX
File(s):./Packages/com.dotbunny.gdx/GDX/Developer/ConsoleCommands/GarbageCollectionConsoleCommand.cs
Covered lines:3
Uncovered lines:10
Coverable lines:13
Total lines:36
Line coverage:23% (3 of 13)
Covered branches:0
Total branches:0
Covered methods:1
Total methods:4
Method coverage:25% (1 of 4)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Evaluate(...)0%2100%
GetAccessLevel()0%2100%
GetKeyword()0%110100%
GetHelpMessage()0%2100%

File(s)

./Packages/com.dotbunny.gdx/GDX/Developer/ConsoleCommands/GarbageCollectionConsoleCommand.cs

#LineLine coverage
 1// Copyright (c) 2020-2022 dotBunny Inc.
 2// dotBunny licenses this file to you under the BSL-1.0 license.
 3// See the LICENSE file in the project root for more information.
 4
 5namespace GDX.Developer.ConsoleCommands
 6{
 7#if UNITY_2022_2_OR_NEWER
 8    public class GarbageCollectionConsoleCommand : ConsoleCommandBase
 9    {
 10        /// <inheritdoc />
 11        public override bool Evaluate(float deltaTime)
 012        {
 013            Memory.CleanUp();
 014            return true;
 015        }
 16
 17        /// <inheritdoc />
 18        public override Console.ConsoleAccessLevel GetAccessLevel()
 019        {
 020            return Console.ConsoleAccessLevel.Anonymous;
 021        }
 22
 23        /// <inheritdoc />
 24        public override string GetKeyword()
 725        {
 726            return "gc";
 727        }
 28
 29        /// <inheritdoc />
 30        public override string GetHelpMessage()
 031        {
 032            return "Force garbage collection be ran for managed memory.";
 033        }
 34    }
 35#endif // UNITY_2022_2_OR_NEWER
 36}

Coverage by test methods







Methods/Properties

Evaluate(System.Single)
GetAccessLevel()
GetKeyword()
GetHelpMessage()