# Global Metrics

path: .metrics.nom.functions
old: 3.0
new: 34.0
path: .metrics.nom.total
old: 3.0
new: 34.0
path: .metrics.halstead.length
old: 615.0
new: 2186.0
path: .metrics.halstead.time
old: 5949.5925508754535
new: 47213.58777360516
path: .metrics.halstead.N1
old: 349.0
new: 1215.0
path: .metrics.halstead.vocabulary
old: 104.0
new: 346.0
path: .metrics.halstead.effort
old: 107092.66591575816
new: 849844.579924893
path: .metrics.halstead.bugs
old: 0.751712718856214
new: 2.9906924286605916
path: .metrics.halstead.level
old: 0.03847854931446263
new: 0.0216958462066598
path: .metrics.halstead.volume
old: 4120.770426656772
new: 18438.097305613883
path: .metrics.halstead.n2
old: 87.0
new: 316.0
path: .metrics.halstead.purity_ratio
old: 1.024427564943244
new: 1.2677042242873833
path: .metrics.halstead.n1
old: 17.0
new: 30.0
path: .metrics.halstead.N2
old: 266.0
new: 971.0
path: .metrics.halstead.estimated_program_length
old: 630.0229524400951
new: 2771.20143429222
path: .metrics.halstead.difficulty
old: 25.988505747126435
new: 46.09177215189873
path: .metrics.nexits.sum
old: 0.0
new: 38.0
path: .metrics.nexits.average
old: 0.0
new: 1.1176470588235294
path: .metrics.cyclomatic.average
old: 1.0
new: 1.7272727272727273
path: .metrics.cyclomatic.sum
old: 7.0
new: 76.0
path: .metrics.nargs.sum
old: 2.0
new: 59.0
path: .metrics.nargs.average
old: 0.6666666666666666
new: 1.7352941176470589
path: .metrics.mi.mi_original
old: 46.1677860908421
new: -4.626764145040951
path: .metrics.mi.mi_sei
old: 18.070676831073925
new: -43.75794155584307
path: .metrics.mi.mi_visual_studio
old: 26.99870531628193
new: 0.0
path: .metrics.cognitive.sum
old: 0.0
new: 36.0
path: .metrics.cognitive.average
old: 0.0
new: 1.0588235294117647
path: .metrics.loc.sloc
old: 139.0
new: 742.0
path: .metrics.loc.blank
old: 23.0
new: 104.0
path: .metrics.loc.cloc
old: 18.0
new: 137.0
path: .metrics.loc.lloc
old: 24.0
new: 164.0
path: .metrics.loc.ploc
old: 98.0
new: 501.0

# Spaces Data

## Minimal test - lines (63, 68)

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N2
old: 30.0
new: 13.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 171.40151256706753
new: 52.87076540327685
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.effort
old: 3030.2972721476895
new: 539.3407219029823
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.volume
old: 454.5445908221534
new: 118.53642239625984
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.length
old: 86.0
new: 29.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N1
old: 56.0
new: 16.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n1
old: 12.0
new: 7.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n2
old: 27.0
new: 10.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.bugs
old: 0.06980216642347996
new: 0.022086194208443856
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.level
old: 0.15
new: 0.21978021978021975
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.9930408438031109
new: 1.8231298414923052
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.time
old: 168.3498484526494
new: 29.96337343905457
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.vocabulary
old: 39.0
new: 17.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.difficulty
old: 6.666666666666667
new: 4.55
path: .spaces[0].spaces[0].spaces[0].metrics.cyclomatic.sum
old: 3.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.nargs.sum
old: 0.0
new: 3.0
path: .spaces[0].spaces[0].spaces[0].metrics.nargs.average
old: 0.0
new: 3.0
path: .spaces[0].spaces[0].spaces[0].metrics.nom.total
old: 2.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.nom.functions
old: 2.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.blank
old: 5.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.cloc
old: 5.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.ploc
old: 18.0
new: 6.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.sloc
old: 28.0
new: 6.0
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_sei
old: 76.96803211494577
new: 93.06983711429106
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 49.41985242067411
new: 68.3697960039312
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_original
old: 84.50794763935274
new: 116.91235116672236

### Code

      DumpMemoryInfoToTempDirRunnable(const nsAString& aIdentifier, bool aAnonymize,
                                      bool aMinimizeMemoryUsage)
          : mozilla::Runnable("DumpMemoryInfoToTempDirRunnable"),
            mIdentifier(aIdentifier),
            mAnonymize(aAnonymize),
            mMinimizeMemoryUsage(aMinimizeMemoryUsage) {}

## Minimal test - lines (70, 76)

path: .spaces[0].spaces[0].spaces[1].metrics.loc.ploc
old: 64.0
new: 7.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.lloc
old: 24.0
new: 2.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.cloc
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.sloc
old: 77.0
new: 7.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.blank
old: 12.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.nargs.sum
old: 2.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.nargs.average
old: 2.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[1].metrics.nexits.average
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_visual_studio
old: 34.27774919024922
new: 66.90798106109055
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_original
old: 58.61495111532616
new: 114.41264761446484
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_sei
old: 17.746030515126918
new: 89.46352719575663
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.purity_ratio
old: 0.7510215169524449
new: 2.649958334134618
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.bugs
old: 0.6500031636202709
new: 0.023133081084626302
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.n1
old: 14.0
new: 9.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.time
old: 4783.905394725547
new: 32.11882115406969
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.volume
old: 3089.158640540263
new: 118.59257041502654
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.difficulty
old: 27.875
new: 4.875
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.estimated_program_length
old: 378.51484454403226
new: 71.54887502163469
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.length
old: 504.0
new: 27.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.effort
old: 86110.29710505984
new: 578.1387807732544
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N2
old: 223.0
new: 13.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.vocabulary
old: 70.0
new: 21.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N1
old: 281.0
new: 14.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.level
old: 0.03587443946188341
new: 0.20512820512820512
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.n2
old: 56.0
new: 12.0

### Code

      NS_IMETHOD Run() override {
        nsCOMPtr dumper =
            do_GetService("@mozilla.org/memory-info-dumper;1");
        dumper->DumpMemoryInfoToTempDir(mIdentifier, mAnonymize,
                                        mMinimizeMemoryUsage);
        return NS_OK;
      }

## Minimal test - lines (59, 122)

path: .spaces[0].metrics.nexits.average
old: 0.0
new: 0.6666666666666666
path: .spaces[0].metrics.nexits.sum
old: 0.0
new: 4.0
path: .spaces[0].metrics.cyclomatic.sum
old: 6.0
new: 9.0
path: .spaces[0].metrics.loc.blank
old: 20.0
new: 13.0
path: .spaces[0].metrics.loc.lloc
old: 24.0
new: 7.0
path: .spaces[0].metrics.loc.cloc
old: 7.0
new: 0.0
path: .spaces[0].metrics.loc.ploc
old: 89.0
new: 51.0
path: .spaces[0].metrics.loc.sloc
old: 116.0
new: 64.0
path: .spaces[0].metrics.nargs.average
old: 0.6666666666666666
new: 1.0
path: .spaces[0].metrics.nargs.sum
old: 2.0
new: 6.0
path: .spaces[0].metrics.mi.mi_visual_studio
old: 28.939525298142307
new: 38.17296526478643
path: .spaces[0].metrics.mi.mi_original
old: 49.48658825982335
new: 65.27577060278479
path: .spaces[0].metrics.mi.mi_sei
old: 14.876247825080828
new: 19.388557281470582
path: .spaces[0].metrics.halstead.effort
old: 110956.7014911072
new: 19528.439709969567
path: .spaces[0].metrics.halstead.vocabulary
old: 96.0
new: 52.0
path: .spaces[0].metrics.halstead.volume
old: 3997.0722379377416
new: 1071.6826670105252
path: .spaces[0].metrics.halstead.bugs
old: 0.7696875061901548
new: 0.2417262281530485
path: .spaces[0].metrics.halstead.length
old: 607.0
new: 188.0
path: .spaces[0].metrics.halstead.level
old: 0.03602371181030552
new: 0.054878048780487805
path: .spaces[0].metrics.halstead.N2
old: 258.0
new: 82.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 0.9349020550366508
new: 1.3304111704889534
path: .spaces[0].metrics.halstead.difficulty
old: 27.759493670886076
new: 18.22222222222222
path: .spaces[0].metrics.halstead.n2
old: 79.0
new: 36.0
path: .spaces[0].metrics.halstead.N1
old: 349.0
new: 106.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 567.4855474072469
new: 250.1173000519232
path: .spaces[0].metrics.halstead.n1
old: 17.0
new: 16.0
path: .spaces[0].metrics.halstead.time
old: 6164.2611939503995
new: 1084.9133172205316
path: .spaces[0].metrics.nom.total
old: 3.0
new: 6.0
path: .spaces[0].metrics.nom.functions
old: 3.0
new: 6.0

### Code

    namespace {

    class DumpMemoryInfoToTempDirRunnable : public Runnable {
     public:
      DumpMemoryInfoToTempDirRunnable(const nsAString& aIdentifier, bool aAnonymize,
                                      bool aMinimizeMemoryUsage)
          : mozilla::Runnable("DumpMemoryInfoToTempDirRunnable"),
            mIdentifier(aIdentifier),
            mAnonymize(aAnonymize),
            mMinimizeMemoryUsage(aMinimizeMemoryUsage) {}

      NS_IMETHOD Run() override {
        nsCOMPtr dumper =
            do_GetService("@mozilla.org/memory-info-dumper;1");
        dumper->DumpMemoryInfoToTempDir(mIdentifier, mAnonymize,
                                        mMinimizeMemoryUsage);
        return NS_OK;
      }

     private:
      const nsString mIdentifier;
      const bool mAnonymize;
      const bool mMinimizeMemoryUsage;
    };

    class GCAndCCLogDumpRunnable final : public Runnable,
                                         public nsIDumpGCAndCCLogsCallback {
     public:
      NS_DECL_ISUPPORTS_INHERITED

      GCAndCCLogDumpRunnable(const nsAString& aIdentifier, bool aDumpAllTraces,
                             bool aDumpChildProcesses)
          : mozilla::Runnable("GCAndCCLogDumpRunnable"),
            mIdentifier(aIdentifier),
            mDumpAllTraces(aDumpAllTraces),
            mDumpChildProcesses(aDumpChildProcesses) {}

      NS_IMETHOD Run() override {
        nsCOMPtr dumper =
            do_GetService("@mozilla.org/memory-info-dumper;1");

        dumper->DumpGCAndCCLogsToFile(mIdentifier, mDumpAllTraces,
                                      mDumpChildProcesses, this);
        return NS_OK;
      }

      NS_IMETHOD OnDump(nsIFile* aGCLog, nsIFile* aCCLog, bool aIsParent) override {
        return NS_OK;
      }

      NS_IMETHOD OnFinish() override { return NS_OK; }

     private:
      ~GCAndCCLogDumpRunnable() = default;

      const nsString mIdentifier;
      const bool mDumpAllTraces;
      const bool mDumpChildProcesses;
    };

    NS_IMPL_ISUPPORTS_INHERITED(GCAndCCLogDumpRunnable, Runnable,
                                nsIDumpGCAndCCLogsCallback)

    }  // namespace

## Minimal test - lines (61, 82)

path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 50.02743950912229
new: 89.65413362810247
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 14.381293183555186
new: 53.94818156666054
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 29.255812578434085
new: 52.42931791117103
path: .spaces[0].spaces[0].metrics.nom.total
old: 3.0
new: 2.0
path: .spaces[0].spaces[0].metrics.nom.functions
old: 3.0
new: 2.0
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 559.7482413725112
new: 134.54427823358145
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 17.0
new: 13.0
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 3974.7626430402233
new: 358.15198247445016
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 348.0
new: 39.0
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.7713612936112098
new: 0.08009631657393124
path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.035706111238269625
new: 0.09615384615384616
path: .spaces[0].spaces[0].metrics.halstead.time
old: 6184.379625157669
new: 206.93225654079345
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 257.0
new: 32.0
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 0.9252037047479524
new: 1.8949898342757951
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 111318.83325283804
new: 3724.780617734282
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 28.006410256410255
new: 10.4
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 95.0
new: 33.0
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 78.0
new: 20.0
path: .spaces[0].spaces[0].metrics.halstead.length
old: 605.0
new: 71.0
path: .spaces[0].spaces[0].metrics.nargs.average
old: 0.6666666666666666
new: 1.5
path: .spaces[0].spaces[0].metrics.nargs.sum
old: 2.0
new: 3.0
path: .spaces[0].spaces[0].metrics.cyclomatic.sum
old: 5.0
new: 3.0
path: .spaces[0].spaces[0].metrics.nexits.average
old: 0.0
new: 0.5
path: .spaces[0].spaces[0].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 24.0
new: 2.0
path: .spaces[0].spaces[0].metrics.loc.blank
old: 21.0
new: 2.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 87.0
new: 20.0
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 114.0
new: 22.0
path: .spaces[0].spaces[0].metrics.loc.cloc
old: 6.0
new: 0.0

### Code

    class DumpMemoryInfoToTempDirRunnable : public Runnable {
     public:
      DumpMemoryInfoToTempDirRunnable(const nsAString& aIdentifier, bool aAnonymize,
                                      bool aMinimizeMemoryUsage)
          : mozilla::Runnable("DumpMemoryInfoToTempDirRunnable"),
            mIdentifier(aIdentifier),
            mAnonymize(aAnonymize),
            mMinimizeMemoryUsage(aMinimizeMemoryUsage) {}

      NS_IMETHOD Run() override {
        nsCOMPtr dumper =
            do_GetService("@mozilla.org/memory-info-dumper;1");
        dumper->DumpMemoryInfoToTempDir(mIdentifier, mAnonymize,
                                        mMinimizeMemoryUsage);
        return NS_OK;
      }

     private:
      const nsString mIdentifier;
      const bool mAnonymize;
      const bool mMinimizeMemoryUsage;
    };