fremag/MemoScope.Net

View on GitHub
MemoScope/Core/Cache/ClrDumpCache.cs

Summary

Maintainability
C
1 day
Test Coverage

File ClrDumpCache.cs has 357 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using Microsoft.Diagnostics.Runtime;
using System.Collections.Generic;
using System.Data.SQLite;
using System.IO;
using WinFwk.UITools.Log;
Severity: Minor
Found in MemoScope/Core/Cache/ClrDumpCache.cs - About 4 hrs to fix

    Class ClrDumpCache has 24 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public class ClrDumpCache
        {
            ClrDump ClrDump { get; }
            public bool DataExists { get; private set; }
    
    
    Severity: Minor
    Found in MemoScope/Core/Cache/ClrDumpCache.cs - About 2 hrs to fix

      Method StoreData has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              private void StoreData(CancellationToken token)
              {
                  BeginUpdate();
                  Dictionary<ClrType, ClrTypeStats> stats = new Dictionary<ClrType, ClrTypeStats>();
                  foreach (var address in ClrDump.Heap.EnumerateObjectAddresses())
      Severity: Minor
      Found in MemoScope/Core/Cache/ClrDumpCache.cs - About 1 hr to fix

        Method LoadInstances has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public List<ulong> LoadInstances(int typeId)
                {
                    int nb = 0;
                    string name = null;
                    CancellationTokenSource token = null;
        Severity: Minor
        Found in MemoScope/Core/Cache/ClrDumpCache.cs - About 1 hr to fix

          Method LoadTypeStat has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public List<ClrTypeStats> LoadTypeStat()
                  {
                      var list = new List<ClrTypeStats>();
                      SQLiteCommand cmd = new SQLiteCommand();
                      cmd.Connection = cxion;
          Severity: Minor
          Found in MemoScope/Core/Cache/ClrDumpCache.cs - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status