# Global Metrics

path: .metrics.nom.functions
old: 11.0
new: 6.0
path: .metrics.nom.total
old: 11.0
new: 12.0
path: .metrics.nom.closures
old: 0.0
new: 6.0
path: .metrics.loc.lloc
old: 150.0
new: 26.0
path: .metrics.loc.cloc
old: 83.0
new: 5.0
path: .metrics.loc.blank
old: 60.0
new: 18.0
path: .metrics.loc.sloc
old: 440.0
new: 89.0
path: .metrics.loc.ploc
old: 297.0
new: 66.0
path: .metrics.mi.mi_sei
old: -28.36324703128765
new: 24.091537560707913
path: .metrics.mi.mi_original
old: 5.355036481629071
new: 55.95255548167128
path: .metrics.mi.mi_visual_studio
old: 3.1316002816544275
new: 32.72079267933993
path: .metrics.cognitive.sum
old: 76.0
new: 2.0
path: .metrics.cognitive.average
old: 6.909090909090909
new: 0.16666666666666666
path: .metrics.nargs.sum
old: 22.0
new: 8.0
path: .metrics.nargs.average
old: 2.0
new: 0.6666666666666666
path: .metrics.halstead.n2
old: 147.0
new: 49.0
path: .metrics.halstead.purity_ratio
old: 0.8963993493438898
new: 1.0881290902964014
path: .metrics.halstead.N2
old: 595.0
new: 137.0
path: .metrics.halstead.N1
old: 757.0
new: 206.0
path: .metrics.halstead.n1
old: 31.0
new: 22.0
path: .metrics.halstead.level
old: 0.015939278937381403
new: 0.03251493032514931
path: .metrics.halstead.effort
old: 634105.9491068193
new: 64873.68236365489
path: .metrics.halstead.vocabulary
old: 178.0
new: 71.0
path: .metrics.halstead.bugs
old: 2.4602918638762614
new: 0.5381761473014084
path: .metrics.halstead.estimated_program_length
old: 1211.931920312939
new: 373.2282779716657
path: .metrics.halstead.difficulty
old: 62.73809523809524
new: 30.755102040816325
path: .metrics.halstead.time
old: 35228.10828371219
new: 3604.093464647494
path: .metrics.halstead.volume
old: 10107.19159866657
new: 2109.363261990106
path: .metrics.halstead.length
old: 1352.0
new: 343.0
path: .metrics.nexits.sum
old: 40.0
new: 4.0
path: .metrics.nexits.average
old: 3.636363636363636
new: 0.3333333333333333
path: .metrics.cyclomatic.sum
old: 83.0
new: 11.0
path: .metrics.cyclomatic.average
old: 5.1875
new: 1.375

# Spaces Data

## Minimal test - lines (18, 46)

path: .spaces[0].metrics.loc.blank
old: 54.0
new: 5.0
path: .spaces[0].metrics.loc.lloc
old: 150.0
new: 5.0
path: .spaces[0].metrics.loc.sloc
old: 421.0
new: 29.0
path: .spaces[0].metrics.loc.cloc
old: 82.0
new: 0.0
path: .spaces[0].metrics.loc.ploc
old: 285.0
new: 24.0
path: .spaces[0].metrics.cognitive.sum
old: 76.0
new: 0.0
path: .spaces[0].metrics.cognitive.average
old: 6.909090909090909
new: 0.0
path: .spaces[0].metrics.halstead.volume
old: 9917.178444618126
new: 512.9283016944967
path: .spaces[0].metrics.halstead.difficulty
old: 65.70652173913044
new: 14.736842105263158
path: .spaces[0].metrics.halstead.level
old: 0.0152191894127378
new: 0.06785714285714285
path: .spaces[0].metrics.halstead.time
old: 36201.29450345204
new: 419.9412996329213
path: .spaces[0].metrics.halstead.bugs
old: 2.505396592186013
new: 0.1283865338352339
path: .spaces[0].metrics.halstead.length
old: 1340.0
new: 100.0
path: .spaces[0].metrics.halstead.n2
old: 138.0
new: 19.0
path: .spaces[0].metrics.halstead.N1
old: 755.0
new: 65.0
path: .spaces[0].metrics.halstead.n1
old: 31.0
new: 16.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 1134.5564606573805
new: 144.71062275542812
path: .spaces[0].metrics.halstead.purity_ratio
old: 0.8466839258637168
new: 1.4471062275542812
path: .spaces[0].metrics.halstead.N2
old: 585.0
new: 35.0
path: .spaces[0].metrics.halstead.effort
old: 651623.3010621367
new: 7558.943393392582
path: .spaces[0].metrics.halstead.vocabulary
old: 169.0
new: 35.0
path: .spaces[0].metrics.nexits.sum
old: 40.0
new: 2.0
path: .spaces[0].metrics.nexits.average
old: 3.636363636363636
new: 0.5
path: .spaces[0].metrics.nargs.average
old: 2.0
new: 1.0
path: .spaces[0].metrics.nargs.sum
old: 22.0
new: 4.0
path: .spaces[0].metrics.nom.total
old: 11.0
new: 4.0
path: .spaces[0].metrics.nom.functions
old: 11.0
new: 4.0
path: .spaces[0].metrics.cyclomatic.average
old: 5.466666666666667
new: 1.2
path: .spaces[0].metrics.cyclomatic.sum
old: 82.0
new: 6.0
path: .spaces[0].metrics.mi.mi_visual_studio
old: 3.7420027511141023
new: 48.31643273483792
path: .spaces[0].metrics.mi.mi_original
old: 6.398824704405115
new: 82.62109997657285
path: .spaces[0].metrics.mi.mi_sei
old: -26.53642302520502
new: 44.107118373406934

### Code

    class TestEvent final : public Runnable, nsIRunnablePriority {
     public:
      explicit TestEvent(int* aCounter, std::function&& aCheck,
                         uint32_t aPriority = nsIRunnablePriority::PRIORITY_NORMAL)
          : Runnable("TestEvent"),
            mCounter(aCounter),
            mCheck(std::move(aCheck)),
            mPriority(aPriority) {}

      NS_DECL_ISUPPORTS_INHERITED

      NS_IMETHOD GetPriority(uint32_t* aPriority) override {
        *aPriority = mPriority;
        return NS_OK;
      }

      NS_IMETHODIMP Run() override {
        (*mCounter)++;
        mCheck();
        return NS_OK;
      }

     private:
      ~TestEvent() = default;

      int* mCounter;
      std::function mCheck;
      uint32_t mPriority;
    };

## Minimal test - lines (20, 25)

path: .spaces[0].spaces[0].metrics.cognitive.sum
old: 76.0
new: 0.0
path: .spaces[0].spaces[0].metrics.cognitive.average
old: 6.909090909090909
new: 0.0
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 420.0
new: 6.0
path: .spaces[0].spaces[0].metrics.loc.cloc
old: 82.0
new: 0.0
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 150.0
new: 0.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 284.0
new: 6.0
path: .spaces[0].spaces[0].metrics.loc.blank
old: 54.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nargs.average
old: 2.0
new: 3.0
path: .spaces[0].spaces[0].metrics.nargs.sum
old: 22.0
new: 3.0
path: .spaces[0].spaces[0].metrics.cyclomatic.average
old: 5.785714285714286
new: 2.0
path: .spaces[0].spaces[0].metrics.cyclomatic.sum
old: 81.0
new: 2.0
path: .spaces[0].spaces[0].metrics.nexits.sum
old: 40.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nexits.average
old: 3.636363636363636
new: 0.0
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 6.681136596711966
new: 114.48296485735555
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 3.907097424977757
new: 66.94910225576349
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: -26.199432402917154
new: 89.66679339276854
path: .spaces[0].spaces[0].metrics.nom.total
old: 11.0
new: 1.0
path: .spaces[0].spaces[0].metrics.nom.functions
old: 11.0
new: 1.0
path: .spaces[0].spaces[0].metrics.halstead.length
old: 1338.0
new: 40.0
path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.015134776844896156
new: 0.14545454545454545
path: .spaces[0].spaces[0].metrics.halstead.time
old: 36306.81844367765
new: 69.1099743286488
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 31.0
new: 11.0
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 9890.920711677982
new: 180.94247824228052
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 653522.7319861978
new: 1243.9795379156783
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 584.0
new: 15.0
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 66.07299270072993
new: 6.875
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 0.8415623923674029
new: 2.0268324453416033
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 168.0
new: 23.0
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 1126.0104809875852
new: 81.07329781366414
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 137.0
new: 12.0
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 2.5102629199262654
new: 0.03855560921528433
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 754.0
new: 25.0

### Code

      explicit TestEvent(int* aCounter, std::function&& aCheck,
                         uint32_t aPriority = nsIRunnablePriority::PRIORITY_NORMAL)
          : Runnable("TestEvent"),
            mCounter(aCounter),
            mCheck(std::move(aCheck)),
            mPriority(aPriority) {}