# Global Metrics

path: .metrics.nom.total
old: 2.0
new: 3.0
path: .metrics.nom.functions
old: 2.0
new: 3.0
path: .metrics.cognitive.average
old: 4.0
new: 0.3333333333333333
path: .metrics.cognitive.sum
old: 8.0
new: 1.0
path: .metrics.nargs.sum
old: 3.0
new: 0.0
path: .metrics.nargs.average
old: 1.5
new: 0.0
path: .metrics.halstead.difficulty
old: 32.38636363636363
new: 15.5
path: .metrics.halstead.level
old: 0.030877192982456145
new: 0.06451612903225806
path: .metrics.halstead.effort
old: 35049.34873930262
new: 6308.45392315042
path: .metrics.halstead.time
old: 1947.186041072368
new: 350.4696623972456
path: .metrics.halstead.volume
old: 1082.225504932853
new: 406.9970273000271
path: .metrics.halstead.N2
old: 75.0
new: 31.0
path: .metrics.halstead.bugs
old: 0.35699766896757507
new: 0.1138048320406807
path: .metrics.halstead.estimated_program_length
old: 178.81811836544864
new: 138.97373660251154
path: .metrics.halstead.N1
old: 127.0
new: 49.0
path: .metrics.halstead.length
old: 202.0
new: 80.0
path: .metrics.halstead.n2
old: 22.0
new: 17.0
path: .metrics.halstead.n1
old: 19.0
new: 17.0
path: .metrics.halstead.purity_ratio
old: 0.8852382097299437
new: 1.7371717075313942
path: .metrics.halstead.vocabulary
old: 41.0
new: 34.0
path: .metrics.loc.lloc
old: 13.0
new: 3.0
path: .metrics.loc.cloc
old: 12.0
new: 10.0
path: .metrics.loc.blank
old: 1.0
new: 8.0
path: .metrics.loc.ploc
old: 29.0
new: 25.0
path: .metrics.loc.sloc
old: 42.0
new: 43.0
path: .metrics.cyclomatic.average
old: 3.0
new: 1.2
path: .metrics.cyclomatic.sum
old: 9.0
new: 6.0
path: .metrics.mi.mi_original
old: 72.04852295028283
new: 77.44276754204344
path: .metrics.mi.mi_sei
old: 65.99124108851458
new: 70.61160040221246
path: .metrics.mi.mi_visual_studio
old: 42.13363915221218
new: 45.28816815324178
path: .metrics.nexits.average
old: 3.0
new: 0.3333333333333333
path: .metrics.nexits.sum
old: 6.0
new: 1.0

# Spaces Data

## Minimal test - lines (21, 41)

path: .spaces[0].metrics.halstead.length
old: 123.0
new: 70.0
path: .spaces[0].metrics.halstead.vocabulary
old: 27.0
new: 29.0
path: .spaces[0].metrics.halstead.effort
old: 22370.556975803574
new: 5780.997384201811
path: .spaces[0].metrics.halstead.N2
old: 45.0
new: 24.0
path: .spaces[0].metrics.halstead.n2
old: 10.0
new: 12.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 102.7061492501294
new: 112.50641830990963
path: .spaces[0].metrics.halstead.time
old: 1242.8087208779764
new: 321.16652134454506
path: .spaces[0].metrics.halstead.bugs
old: 0.26464474622974854
new: 0.10736941672688542
path: .spaces[0].metrics.halstead.level
old: 0.026143790849673203
new: 0.058823529411764705
path: .spaces[0].metrics.halstead.volume
old: 584.8511627661065
new: 340.05866965893006
path: .spaces[0].metrics.halstead.N1
old: 78.0
new: 46.0
path: .spaces[0].metrics.halstead.difficulty
old: 38.25
new: 17.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 0.8350093434969869
new: 1.6072345472844234
path: .spaces[0].metrics.loc.sloc
old: 16.0
new: 21.0
path: .spaces[0].metrics.loc.lloc
old: 8.0
new: 3.0
path: .spaces[0].metrics.loc.cloc
old: 2.0
new: 0.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 4.0
path: .spaces[0].metrics.loc.ploc
old: 15.0
new: 17.0
path: .spaces[0].metrics.nexits.average
old: 4.0
new: 0.3333333333333333
path: .spaces[0].metrics.nexits.sum
old: 4.0
new: 1.0
path: .spaces[0].metrics.nargs.average
old: 2.0
new: 0.0
path: .spaces[0].metrics.nargs.sum
old: 2.0
new: 0.0
path: .spaces[0].metrics.mi.mi_sei
old: 83.28920126536173
new: 54.9643304635249
path: .spaces[0].metrics.mi.mi_original
old: 91.80300426007332
new: 90.21732207405068
path: .spaces[0].metrics.mi.mi_visual_studio
old: 53.68596740355163
new: 52.7586678795618
path: .spaces[0].metrics.nom.total
old: 1.0
new: 3.0
path: .spaces[0].metrics.nom.functions
old: 1.0
new: 3.0
path: .spaces[0].metrics.cognitive.sum
old: 6.0
new: 1.0
path: .spaces[0].metrics.cognitive.average
old: 6.0
new: 0.3333333333333333
path: .spaces[0].metrics.cyclomatic.average
old: 5.0
new: 1.25

### Code

    class nsUserIdleServiceWin : public nsUserIdleService {
     public:
      NS_INLINE_DECL_REFCOUNTING_INHERITED(nsUserIdleServiceWin, nsUserIdleService)

      bool PollIdleTime(uint32_t* aIdleTime) override;

      static already_AddRefed GetInstance() {
        RefPtr idleService =
            nsUserIdleService::GetInstance().downcast();
        if (!idleService) {
          idleService = new nsUserIdleServiceWin();
        }

        return idleService.forget();
      }

     protected:
      nsUserIdleServiceWin() {}
      virtual ~nsUserIdleServiceWin() {}
      bool UsePollMode() override;
    };