# Global Metrics

path: .metrics.nargs.average
old: 0.6190476190476191
new: 1.0
path: .metrics.nargs.sum
old: 13.0
new: 14.0
path: .metrics.nom.closures
old: 0.0
new: 7.0
path: .metrics.nom.functions
old: 21.0
new: 7.0
path: .metrics.nom.total
old: 21.0
new: 14.0
path: .metrics.halstead.bugs
old: 0.5676046151022102
new: 0.8197226299642516
path: .metrics.halstead.purity_ratio
old: 2.0478568799386867
new: 0.69477792540061
path: .metrics.halstead.effort
old: 70266.89434924057
new: 121950.13045017298
path: .metrics.halstead.estimated_program_length
old: 1255.336267402415
new: 480.0915464518215
path: .metrics.halstead.n2
old: 161.0
new: 69.0
path: .metrics.halstead.time
old: 3903.716352735587
new: 6775.007247231832
path: .metrics.halstead.n1
old: 18.0
new: 15.0
path: .metrics.halstead.N2
old: 274.0
new: 254.0
path: .metrics.halstead.volume
old: 4587.579071462989
new: 4417.091339140124
path: .metrics.halstead.difficulty
old: 15.316770186335404
new: 27.60869565217391
path: .metrics.halstead.length
old: 613.0
new: 691.0
path: .metrics.halstead.level
old: 0.06528791565287916
new: 0.03622047244094488
path: .metrics.halstead.vocabulary
old: 179.0
new: 84.0
path: .metrics.halstead.N1
old: 339.0
new: 437.0
path: .metrics.cyclomatic.sum
old: 26.0
new: 9.0
path: .metrics.cyclomatic.average
old: 1.04
new: 1.125
path: .metrics.mi.mi_visual_studio
old: 16.641029918227414
new: 24.779923654305147
path: .metrics.mi.mi_sei
old: 6.715239009025176
new: 1.9419072291432256
path: .metrics.mi.mi_original
old: 28.456161160168875
new: 42.37366944886181
path: .metrics.loc.cloc
old: 100.0
new: 7.0
path: .metrics.loc.lloc
old: 29.0
new: 47.0
path: .metrics.loc.sloc
old: 306.0
new: 167.0
path: .metrics.loc.blank
old: 40.0
new: 26.0
path: .metrics.loc.ploc
old: 166.0
new: 134.0
path: .metrics.nexits.average
old: 0.47619047619047616
new: 0.0
path: .metrics.nexits.sum
old: 10.0
new: 0.0
path: .metrics.cognitive.average
old: 0.047619047619047616
new: 0.07142857142857142

# Spaces Data

## Minimal test - lines (13, 25)

path: .spaces[0].metrics.nexits.average
old: null
new: 0.0
path: .spaces[0].metrics.loc.sloc
old: 1.0
new: 13.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 2.0
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 5.0
path: .spaces[0].metrics.loc.ploc
old: 1.0
new: 11.0
path: .spaces[0].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].metrics.nom.total
old: 0.0
new: 2.0
path: .spaces[0].metrics.nom.closures
old: 0.0
new: 1.0
path: .spaces[0].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[0].metrics.nargs.average
old: null
new: 1.0
path: .spaces[0].metrics.halstead.n2
old: 1.0
new: 11.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: null
new: 71.27302875388389
path: .spaces[0].metrics.halstead.length
old: 1.0
new: 51.0
path: .spaces[0].metrics.halstead.bugs
old: 0.0
new: 0.051753765634246024
path: .spaces[0].metrics.halstead.N1
old: 0.0
new: 32.0
path: .spaces[0].metrics.halstead.N2
old: 1.0
new: 19.0
path: .spaces[0].metrics.halstead.effort
old: 0.0
new: 1934.6161739420995
path: .spaces[0].metrics.halstead.volume
old: 0.0
new: 224.0081885617168
path: .spaces[0].metrics.halstead.difficulty
old: 0.0
new: 8.636363636363637
path: .spaces[0].metrics.halstead.n1
old: 0.0
new: 10.0
path: .spaces[0].metrics.halstead.purity_ratio
old: null
new: 1.3975103677232137
path: .spaces[0].metrics.halstead.level
old: null
new: 0.11578947368421053
path: .spaces[0].metrics.halstead.time
old: 0.0
new: 107.47867633011666
path: .spaces[0].metrics.halstead.vocabulary
old: 1.0
new: 21.0
path: .spaces[0].metrics.mi.mi_original
old: null
new: 101.07707085134004
path: .spaces[0].metrics.mi.mi_sei
old: null
new: 70.2243567322024
path: .spaces[0].metrics.mi.mi_visual_studio
old: null
new: 59.10939815867838

### Code

    TEST(NSPRLogModulesParser, Empty)
    {
      bool callbackInvoked = false;
      auto callback = [&](const char*, mozilla::LogLevel, int32_t) mutable {
        callbackInvoked = true;
      };

      mozilla::NSPRLogModulesParser(nullptr, callback);
      EXPECT_FALSE(callbackInvoked);

      mozilla::NSPRLogModulesParser("", callback);
      EXPECT_FALSE(callbackInvoked);
    }

## Minimal test - lines (27, 42)

path: .spaces[1].metrics.halstead.N1
old: 337.0
new: 42.0
path: .spaces[1].metrics.halstead.length
old: 587.0
new: 71.0
path: .spaces[1].metrics.halstead.difficulty
old: 16.18705035971223
new: 9.0625
path: .spaces[1].metrics.halstead.time
old: 3850.667607553404
new: 168.0243989523005
path: .spaces[1].metrics.halstead.estimated_program_length
old: 1064.5914591345293
new: 97.21928094887365
path: .spaces[1].metrics.halstead.N2
old: 250.0
new: 29.0
path: .spaces[1].metrics.halstead.n1
old: 18.0
new: 10.0
path: .spaces[1].metrics.halstead.effort
old: 69312.01693596128
new: 3024.439181141409
path: .spaces[1].metrics.halstead.vocabulary
old: 157.0
new: 26.0
path: .spaces[1].metrics.halstead.level
old: 0.06177777777777778
new: 0.1103448275862069
path: .spaces[1].metrics.halstead.bugs
old: 0.5624506673825941
new: 0.06971217760541591
path: .spaces[1].metrics.halstead.n2
old: 139.0
new: 16.0
path: .spaces[1].metrics.halstead.purity_ratio
old: 1.813614070075859
new: 1.3692856471672343
path: .spaces[1].metrics.halstead.volume
old: 4281.942379599385
new: 333.73121998801753
path: .spaces[1].metrics.nom.closures
old: 0.0
new: 1.0
path: .spaces[1].metrics.nom.total
old: 21.0
new: 2.0
path: .spaces[1].metrics.nom.functions
old: 21.0
new: 1.0
path: .spaces[1].metrics.loc.lloc
old: 29.0
new: 8.0
path: .spaces[1].metrics.loc.blank
old: 34.0
new: 2.0
path: .spaces[1].metrics.loc.ploc
old: 141.0
new: 14.0
path: .spaces[1].metrics.loc.cloc
old: 84.0
new: 0.0
path: .spaces[1].metrics.loc.sloc
old: 259.0
new: 16.0
path: .spaces[1].metrics.nexits.sum
old: 10.0
new: 0.0
path: .spaces[1].metrics.nexits.average
old: 0.47619047619047616
new: 0.0
path: .spaces[1].metrics.mi.mi_sei
old: 11.483413071421936
new: 62.38077720976793
path: .spaces[1].metrics.mi.mi_original
old: 31.976142934756595
new: 95.64031581986688
path: .spaces[1].metrics.mi.mi_visual_studio
old: 18.69949879225532
new: 55.93000925138413
path: .spaces[1].metrics.cyclomatic.sum
old: 24.0
new: 1.0
path: .spaces[1].metrics.cyclomatic.average
old: 1.0434782608695652
new: 1.0
path: .spaces[1].metrics.cognitive.average
old: 0.047619047619047616
new: 0.0
path: .spaces[1].metrics.cognitive.sum
old: 1.0
new: 0.0
path: .spaces[1].metrics.nargs.average
old: 0.6190476190476191
new: 1.0
path: .spaces[1].metrics.nargs.sum
old: 13.0
new: 2.0

### Code

    TEST(NSPRLogModulesParser, DefaultLevel)
    {
      bool callbackInvoked = false;
      auto callback = [&](const char* aName, mozilla::LogLevel aLevel, int32_t) {
        EXPECT_STREQ("Foo", aName);
        EXPECT_EQ(mozilla::LogLevel::Error, aLevel);
        callbackInvoked = true;
      };

      mozilla::NSPRLogModulesParser("Foo", callback);
      EXPECT_TRUE(callbackInvoked);

      callbackInvoked = false;
      mozilla::NSPRLogModulesParser("Foo:", callback);
      EXPECT_TRUE(callbackInvoked);
    }