Global Metrics
path: .metrics.halstead.difficulty
old: 57.473684210526315
new: 19.36842105263158
path: .metrics.halstead.N1
old: 379.0
new: 226.0
path: .metrics.halstead.length
old: 613.0
new: 364.0
path: .metrics.halstead.n1
old: 28.0
new: 16.0
path: .metrics.halstead.estimated_program_length
old: 467.0806686250031
new: 396.47473080739024
path: .metrics.halstead.time
old: 12545.08963475682
new: 2424.3841500324447
path: .metrics.halstead.purity_ratio
old: 0.7619586763866283
new: 1.0892162934268963
path: .metrics.halstead.level
old: 0.0173992673992674
new: 0.051630434782608696
path: .metrics.halstead.volume
old: 3928.956643852411
new: 2253.0961394323263
path: .metrics.halstead.bugs
old: 1.2360696066414354
new: 0.41316929525579177
path: .metrics.halstead.effort
old: 225811.6134256228
new: 43638.914700584006
path: .metrics.halstead.N2
old: 234.0
new: 138.0
path: .metrics.halstead.vocabulary
old: 85.0
new: 73.0
path: .metrics.nargs.average
old: 1.1176470588235294
new: 0.2
path: .metrics.nargs.sum
old: 19.0
new: 1.0
path: .metrics.cognitive.sum
old: 5.0
new: 17.0
path: .metrics.cognitive.average
old: 0.29411764705882354
new: 3.4
path: .metrics.nexits.average
old: 0.5882352941176471
new: 1.8
path: .metrics.nexits.sum
old: 10.0
new: 9.0
path: .metrics.loc.cloc
old: 26.0
new: 15.0
path: .metrics.loc.sloc
old: 162.0
new: 115.0
path: .metrics.loc.blank
old: 19.0
new: 21.0
path: .metrics.loc.lloc
old: 39.0
new: 40.0
path: .metrics.loc.ploc
old: 117.0
new: 79.0
path: .metrics.mi.mi_visual_studio
old: 23.271969362199844
new: 28.612739381256706
path: .metrics.mi.mi_sei
old: 13.3342982025272
new: 23.665304198308373
path: .metrics.mi.mi_original
old: 39.79506760936174
new: 48.92778434194896
path: .metrics.nom.functions
old: 17.0
new: 5.0
path: .metrics.nom.total
old: 17.0
new: 5.0
path: .metrics.cyclomatic.sum
old: 25.0
new: 22.0
path: .metrics.cyclomatic.average
old: 1.3157894736842106
new: 3.6666666666666665
Spaces Data
Minimal test - lines (32, 62)
path: .spaces[0].metrics.nexits.sum
old: 10.0
new: 2.0
path: .spaces[0].metrics.nexits.average
old: 0.5882352941176471
new: 2.0
path: .spaces[0].metrics.nargs.average
old: 1.1176470588235294
new: 0.0
path: .spaces[0].metrics.nargs.sum
old: 19.0
new: 0.0
path: .spaces[0].metrics.cognitive.average
old: 0.29411764705882354
new: 6.0
path: .spaces[0].metrics.cognitive.sum
old: 5.0
new: 6.0
path: .spaces[0].metrics.nom.total
old: 17.0
new: 1.0
path: .spaces[0].metrics.nom.functions
old: 17.0
new: 1.0
path: .spaces[0].metrics.halstead.difficulty
old: 60.75471698113208
new: 10.384615384615383
path: .spaces[0].metrics.halstead.N2
old: 230.0
new: 45.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 438.1857219094625
new: 165.23098268032226
path: .spaces[0].metrics.halstead.length
old: 609.0
new: 119.0
path: .spaces[0].metrics.halstead.bugs
old: 1.2678355650249329
new: 0.11592102577204724
path: .spaces[0].metrics.halstead.level
old: 0.016459627329192546
new: 0.0962962962962963
path: .spaces[0].metrics.halstead.purity_ratio
old: 0.7195167847446018
new: 1.3884956527758172
path: .spaces[0].metrics.halstead.N1
old: 379.0
new: 74.0
path: .spaces[0].metrics.halstead.time
old: 13031.780983916868
new: 360.29040813449234
path: .spaces[0].metrics.halstead.volume
old: 3860.968651756736
new: 624.5033740997867
path: .spaces[0].metrics.halstead.effort
old: 234572.0577105036
new: 6485.227346420862
path: .spaces[0].metrics.halstead.n2
old: 53.0
new: 26.0
path: .spaces[0].metrics.halstead.vocabulary
old: 81.0
new: 38.0
path: .spaces[0].metrics.halstead.n1
old: 28.0
new: 12.0
path: .spaces[0].metrics.loc.ploc
old: 112.0
new: 26.0
path: .spaces[0].metrics.loc.blank
old: 16.0
new: 3.0
path: .spaces[0].metrics.loc.cloc
old: 16.0
new: 2.0
path: .spaces[0].metrics.loc.lloc
old: 39.0
new: 15.0
path: .spaces[0].metrics.loc.sloc
old: 144.0
new: 31.0
path: .spaces[0].metrics.mi.mi_sei
old: 12.058072165117924
new: 60.0128342214109
path: .spaces[0].metrics.mi.mi_visual_studio
old: 24.57539355925287
new: 46.95159782379474
path: .spaces[0].metrics.mi.mi_original
old: 42.0239229863224
new: 80.287232278689
path: .spaces[0].metrics.cyclomatic.sum
old: 24.0
new: 7.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.3333333333333333
new: 7.0
Code
static void Initialize() {
if (!gdk_display_get_default() ||
!GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
return;
}
// This will leak - See comments in ~nsUserIdleServiceGTK().
PRLibrary* xsslib = PR_LoadLibrary("libXss.so.1");
if (!xsslib) // ouch.
{
MOZ_LOG(sIdleLog, LogLevel::Warning, ("Failed to find libXss.so!\n"));
return;
}
_XSSQueryExtension = (_XScreenSaverQueryExtension_fn)PR_FindFunctionSymbol(
xsslib, "XScreenSaverQueryExtension");
_XSSAllocInfo = (_XScreenSaverAllocInfo_fn)PR_FindFunctionSymbol(
xsslib, "XScreenSaverAllocInfo");
_XSSQueryInfo = (_XScreenSaverQueryInfo_fn)PR_FindFunctionSymbol(
xsslib, "XScreenSaverQueryInfo");
if (!_XSSQueryExtension)
MOZ_LOG(sIdleLog, LogLevel::Warning,
("Failed to get XSSQueryExtension!\n"));
if (!_XSSAllocInfo)
MOZ_LOG(sIdleLog, LogLevel::Warning, ("Failed to get XSSAllocInfo!\n"));
if (!_XSSQueryInfo)
MOZ_LOG(sIdleLog, LogLevel::Warning, ("Failed to get XSSQueryInfo!\n"));
sInitialized = true;
}