# Global Metrics

path: .metrics.nom.functions
old: 26.0
new: 20.0
path: .metrics.nom.total
old: 26.0
new: 22.0
path: .metrics.nom.closures
old: 0.0
new: 2.0
path: .metrics.mi.mi_visual_studio
old: 19.718434297085093
new: 0.0
path: .metrics.mi.mi_sei
old: -4.10308804925435
new: -43.974612550911274
path: .metrics.mi.mi_original
old: 33.71852264801551
new: -3.2751475210692576
path: .metrics.nexits.average
old: 0.6923076923076923
new: 2.363636363636364
path: .metrics.nexits.sum
old: 18.0
new: 52.0
path: .metrics.halstead.volume
old: 4454.526700615703
new: 15450.41668665208
path: .metrics.halstead.effort
old: 342561.0577893129
new: 873765.0282305031
path: .metrics.halstead.level
old: 0.013003599210495764
new: 0.01768257619321449
path: .metrics.halstead.difficulty
old: 76.90178571428571
new: 56.552845528455286
path: .metrics.halstead.n1
old: 29.0
new: 37.0
path: .metrics.halstead.time
old: 19031.16987718405
new: 48542.50156836128
path: .metrics.halstead.vocabulary
old: 85.0
new: 283.0
path: .metrics.halstead.purity_ratio
old: 0.6706378769696768
new: 1.1315805708179885
path: .metrics.halstead.estimated_program_length
old: 466.09332449392537
new: 2146.608342841724
path: .metrics.halstead.N1
old: 398.0
new: 1145.0
path: .metrics.halstead.N2
old: 297.0
new: 752.0
path: .metrics.halstead.bugs
old: 1.6319395686218332
new: 3.046551454882867
path: .metrics.halstead.length
old: 695.0
new: 1897.0
path: .metrics.halstead.n2
old: 56.0
new: 246.0
path: .metrics.loc.blank
old: 33.0
new: 95.0
path: .metrics.loc.sloc
old: 205.0
new: 618.0
path: .metrics.loc.cloc
old: 14.0
new: 88.0
path: .metrics.loc.lloc
old: 53.0
new: 203.0
path: .metrics.loc.ploc
old: 158.0
new: 435.0
path: .metrics.cyclomatic.sum
old: 32.0
new: 87.0
path: .metrics.cyclomatic.average
old: 1.103448275862069
new: 4.142857142857143
path: .metrics.nargs.sum
old: 21.0
new: 17.0
path: .metrics.nargs.average
old: 0.8076923076923077
new: 0.7727272727272727
path: .metrics.cognitive.average
old: 0.19230769230769232
new: 3.727272727272727
path: .metrics.cognitive.sum
old: 5.0
new: 82.0

# Spaces Data

## Minimal test - lines (60, 108)

path: .spaces[0].metrics.nexits.sum
old: 18.0
new: 2.0
path: .spaces[0].metrics.nexits.average
old: 0.6923076923076923
new: 2.0
path: .spaces[0].metrics.cognitive.sum
old: 5.0
new: 14.0
path: .spaces[0].metrics.cognitive.average
old: 0.19230769230769232
new: 14.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.1071428571428572
new: 12.0
path: .spaces[0].metrics.cyclomatic.sum
old: 31.0
new: 12.0
path: .spaces[0].metrics.mi.mi_sei
old: -3.997676560292099
new: 40.96196084640309
path: .spaces[0].metrics.mi.mi_original
old: 35.86951160779472
new: 69.3466080240008
path: .spaces[0].metrics.mi.mi_visual_studio
old: 20.976322577657733
new: 40.55357194386011
path: .spaces[0].metrics.nom.total
old: 26.0
new: 1.0
path: .spaces[0].metrics.nom.functions
old: 26.0
new: 1.0
path: .spaces[0].metrics.nargs.sum
old: 21.0
new: 1.0
path: .spaces[0].metrics.nargs.average
old: 0.8076923076923077
new: 1.0
path: .spaces[0].metrics.loc.lloc
old: 52.0
new: 25.0
path: .spaces[0].metrics.loc.sloc
old: 184.0
new: 49.0
path: .spaces[0].metrics.loc.ploc
old: 147.0
new: 39.0
path: .spaces[0].metrics.loc.cloc
old: 9.0
new: 2.0
path: .spaces[0].metrics.loc.blank
old: 28.0
new: 8.0
path: .spaces[0].metrics.halstead.effort
old: 347416.46494653565
new: 17634.680064978456
path: .spaces[0].metrics.halstead.vocabulary
old: 81.0
new: 41.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 437.3043142020363
new: 181.6849314672201
path: .spaces[0].metrics.halstead.bugs
old: 1.6473239398515356
new: 0.225834593686564
path: .spaces[0].metrics.halstead.n1
old: 29.0
new: 14.0
path: .spaces[0].metrics.halstead.n2
old: 52.0
new: 27.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 0.643094579708877
new: 0.9874181058001092
path: .spaces[0].metrics.halstead.N2
old: 289.0
new: 69.0
path: .spaces[0].metrics.halstead.volume
old: 4311.0980019615445
new: 985.7895688497274
path: .spaces[0].metrics.halstead.time
old: 19300.91471925198
new: 979.7044480543586
path: .spaces[0].metrics.halstead.difficulty
old: 80.58653846153847
new: 17.88888888888889
path: .spaces[0].metrics.halstead.length
old: 680.0
new: 184.0
path: .spaces[0].metrics.halstead.level
old: 0.012409020403293164
new: 0.055900621118012424
path: .spaces[0].metrics.halstead.N1
old: 391.0
new: 115.0

### Code

    nsresult nsMacUtilsImpl::GetArchString(nsAString& aArchString) {
      if (!mBinaryArchs.IsEmpty()) {
        aArchString.Assign(mBinaryArchs);
        return NS_OK;
      }

      uint32_t archMask = base::PROCESS_ARCH_INVALID;
      nsresult rv = GetArchitecturesForBundle(&archMask);
      NS_ENSURE_SUCCESS(rv, rv);

      // The order in the string must always be the same so
      // don't do this in the loop.
      if (archMask & base::PROCESS_ARCH_PPC) {
        mBinaryArchs.AppendLiteral("ppc");
      }

      if (archMask & base::PROCESS_ARCH_I386) {
        if (!mBinaryArchs.IsEmpty()) {
          mBinaryArchs.Append('-');
        }
        mBinaryArchs.AppendLiteral("i386");
      }

      if (archMask & base::PROCESS_ARCH_PPC_64) {
        if (!mBinaryArchs.IsEmpty()) {
          mBinaryArchs.Append('-');
        }
        mBinaryArchs.AppendLiteral("ppc64");
      }

      if (archMask & base::PROCESS_ARCH_X86_64) {
        if (!mBinaryArchs.IsEmpty()) {
          mBinaryArchs.Append('-');
        }
        mBinaryArchs.AppendLiteral("x86_64");
      }

      if (archMask & base::PROCESS_ARCH_ARM_64) {
        if (!mBinaryArchs.IsEmpty()) {
          mBinaryArchs.Append('-');
        }
        mBinaryArchs.AppendLiteral("arm64");
      }

      aArchString.Truncate();
      aArchString.Assign(mBinaryArchs);

      return (aArchString.IsEmpty() ? NS_ERROR_FAILURE : NS_OK);
    }