Global Metrics
path: .metrics.cyclomatic.average
old: 5.0
new: 1.2
path: .metrics.cyclomatic.sum
old: 15.0
new: 6.0
path: .metrics.halstead.n1
old: 27.0
new: 17.0
path: .metrics.halstead.purity_ratio
old: 0.9369024667975324
new: 1.6593221244603005
path: .metrics.halstead.time
old: 19410.018151515407
new: 333.8774442035726
path: .metrics.halstead.volume
old: 6696.230038285035
new: 366.61052696862873
path: .metrics.halstead.estimated_program_length
old: 882.5621237232755
new: 122.78983721006222
path: .metrics.halstead.N1
old: 513.0
new: 47.0
path: .metrics.halstead.n2
old: 111.0
new: 14.0
path: .metrics.halstead.vocabulary
old: 138.0
new: 31.0
path: .metrics.halstead.difficulty
old: 52.17567567567568
new: 16.392857142857142
path: .metrics.halstead.length
old: 942.0
new: 74.0
path: .metrics.halstead.N2
old: 429.0
new: 27.0
path: .metrics.halstead.effort
old: 349380.3267272773
new: 6009.793995664307
path: .metrics.halstead.bugs
old: 1.6535260567052958
new: 0.11018398336877974
path: .metrics.halstead.level
old: 0.019166019166019167
new: 0.06100217864923747
path: .metrics.nexits.sum
old: 3.0
new: 1.0
path: .metrics.nexits.average
old: 1.5
new: 0.3333333333333333
path: .metrics.cognitive.average
old: 6.5
new: 0.3333333333333333
path: .metrics.cognitive.sum
old: 13.0
new: 1.0
path: .metrics.mi.mi_visual_studio
old: 22.31868089396682
new: 47.5561410194165
path: .metrics.mi.mi_sei
old: 11.71474191769088
new: 74.1669627666879
path: .metrics.mi.mi_original
old: 38.16494432868326
new: 81.32100114320222
path: .metrics.nom.total
old: 2.0
new: 3.0
path: .metrics.nom.functions
old: 2.0
new: 3.0
path: .metrics.nargs.sum
old: 3.0
new: 0.0
path: .metrics.nargs.average
old: 1.5
new: 0.0
path: .metrics.loc.cloc
old: 32.0
new: 7.0
path: .metrics.loc.lloc
old: 64.0
new: 3.0
path: .metrics.loc.sloc
old: 174.0
new: 35.0
path: .metrics.loc.ploc
old: 125.0
new: 21.0
path: .metrics.loc.blank
old: 17.0
new: 7.0
Spaces Data
Minimal test - lines (13, 33)
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.cyclomatic.sum
old: 7.0
new: 5.0
path: .spaces[0].metrics.cyclomatic.average
old: 7.0
new: 1.25
path: .spaces[0].metrics.loc.lloc
old: 41.0
new: 3.0
path: .spaces[0].metrics.loc.cloc
old: 2.0
new: 0.0
path: .spaces[0].metrics.loc.ploc
old: 48.0
new: 17.0
path: .spaces[0].metrics.loc.sloc
old: 52.0
new: 21.0
path: .spaces[0].metrics.loc.blank
old: 2.0
new: 4.0
path: .spaces[0].metrics.cognitive.average
old: 7.0
new: 0.3333333333333333
path: .spaces[0].metrics.cognitive.sum
old: 7.0
new: 1.0
path: .spaces[0].metrics.halstead.N2
old: 86.0
new: 24.0
path: .spaces[0].metrics.halstead.difficulty
old: 41.04545454545455
new: 17.0
path: .spaces[0].metrics.halstead.time
old: 2610.814400271856
new: 321.16652134454506
path: .spaces[0].metrics.halstead.n1
old: 21.0
new: 17.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 0.9021145094235756
new: 1.6072345472844234
path: .spaces[0].metrics.halstead.level
old: 0.024363233665559245
new: 0.058823529411764705
path: .spaces[0].metrics.halstead.vocabulary
old: 43.0
new: 29.0
path: .spaces[0].metrics.halstead.effort
old: 46994.6592048934
new: 5780.997384201811
path: .spaces[0].metrics.halstead.estimated_program_length
old: 190.3461614883745
new: 112.50641830990963
path: .spaces[0].metrics.halstead.n2
old: 22.0
new: 12.0
path: .spaces[0].metrics.halstead.volume
old: 1144.9418632421427
new: 340.05866965893006
path: .spaces[0].metrics.halstead.bugs
old: 0.4340879680250158
new: 0.10736941672688542
path: .spaces[0].metrics.halstead.length
old: 211.0
new: 70.0
path: .spaces[0].metrics.halstead.N1
old: 125.0
new: 46.0
path: .spaces[0].metrics.mi.mi_visual_studio
old: 40.20800247353327
new: 52.7586678795618
path: .spaces[0].metrics.mi.mi_sei
old: 39.163829406213466
new: 54.9643304635249
path: .spaces[0].metrics.mi.mi_original
old: 68.75568422974189
new: 90.21732207405068
path: .spaces[0].metrics.nexits.average
old: 1.0
new: 0.3333333333333333
path: .spaces[0].metrics.nargs.average
old: 3.0
new: 0.0
path: .spaces[0].metrics.nargs.sum
old: 3.0
new: 0.0
Code
class nsUserIdleServiceAndroid : public nsUserIdleService {
public:
NS_INLINE_DECL_REFCOUNTING_INHERITED(nsUserIdleServiceAndroid,
nsUserIdleService)
bool PollIdleTime(uint32_t* aIdleTime) override;
static already_AddRefed GetInstance() {
RefPtr idleService = nsUserIdleService::GetInstance();
if (!idleService) {
idleService = new nsUserIdleServiceAndroid();
}
return idleService.forget().downcast();
}
protected:
nsUserIdleServiceAndroid() {}
virtual ~nsUserIdleServiceAndroid() {}
bool UsePollMode() override;
};