Global Metrics
path: .metrics.nargs.average
old: 1.6
new: 1.0
path: .metrics.nargs.sum
old: 16.0
new: 2.0
path: .metrics.cyclomatic.average
old: 2.5
new: 2.2
path: .metrics.cyclomatic.sum
old: 35.0
new: 11.0
path: .metrics.nom.functions
old: 10.0
new: 2.0
path: .metrics.nom.total
old: 10.0
new: 2.0
path: .metrics.mi.mi_original
old: 17.456338449493515
new: 69.35022565762753
path: .metrics.mi.mi_sei
old: -21.983525021721825
new: 50.58444981796833
path: .metrics.mi.mi_visual_studio
old: 10.208385058183342
new: 40.55568751908043
path: .metrics.cognitive.average
old: 2.6
new: 2.0
path: .metrics.cognitive.sum
old: 26.0
new: 4.0
path: .metrics.halstead.bugs
old: 2.878554252806889
new: 0.18338403882264603
path: .metrics.halstead.purity_ratio
old: 0.8230169484953849
new: 1.8095163821231943
path: .metrics.halstead.N2
old: 661.0
new: 62.0
path: .metrics.halstead.n2
old: 152.0
new: 37.0
path: .metrics.halstead.effort
old: 802497.1722503158
new: 12903.99488058704
path: .metrics.halstead.N1
old: 872.0
new: 86.0
path: .metrics.halstead.difficulty
old: 69.57894736842105
new: 15.08108108108108
path: .metrics.halstead.estimated_program_length
old: 1261.684982043425
new: 267.8084245542328
path: .metrics.halstead.length
old: 1533.0
new: 148.0
path: .metrics.halstead.volume
old: 11533.6204786354
new: 855.6412376016497
path: .metrics.halstead.vocabulary
old: 184.0
new: 55.0
path: .metrics.halstead.level
old: 0.01437216338880484
new: 0.06630824372759857
path: .metrics.halstead.n1
old: 32.0
new: 18.0
path: .metrics.halstead.time
old: 44583.17623612865
new: 716.8886044770578
path: .metrics.loc.lloc
old: 155.0
new: 5.0
path: .metrics.loc.sloc
old: 395.0
new: 52.0
path: .metrics.loc.blank
old: 76.0
new: 10.0
path: .metrics.loc.ploc
old: 274.0
new: 36.0
path: .metrics.loc.cloc
old: 45.0
new: 6.0
path: .metrics.nexits.average
old: 1.3
new: 1.0
path: .metrics.nexits.sum
old: 13.0
new: 2.0
Spaces Data
Minimal test - lines (16, 50)
path: .spaces[0].metrics.nom.functions
old: 1.0
new: 2.0
path: .spaces[0].metrics.nom.total
old: 1.0
new: 2.0
path: .spaces[0].metrics.nexits.sum
old: 5.0
new: 2.0
path: .spaces[0].metrics.nexits.average
old: 5.0
new: 1.0
path: .spaces[0].metrics.loc.sloc
old: 42.0
new: 35.0
path: .spaces[0].metrics.loc.lloc
old: 17.0
new: 5.0
path: .spaces[0].metrics.loc.ploc
old: 35.0
new: 28.0
path: .spaces[0].metrics.cyclomatic.sum
old: 7.0
new: 10.0
path: .spaces[0].metrics.cyclomatic.average
old: 7.0
new: 2.5
path: .spaces[0].metrics.cognitive.average
old: 7.0
new: 2.0
path: .spaces[0].metrics.cognitive.sum
old: 7.0
new: 4.0
path: .spaces[0].metrics.nargs.average
old: 2.0
new: 1.0
path: .spaces[0].metrics.mi.mi_visual_studio
old: 42.479919441126064
new: 44.67706575026995
path: .spaces[0].metrics.mi.mi_sei
old: 29.81021021059716
new: 35.53604845297956
path: .spaces[0].metrics.mi.mi_original
old: 72.64066224432557
new: 76.39778243296162
path: .spaces[0].metrics.halstead.effort
old: 27613.75776646496
new: 12641.247534516806
path: .spaces[0].metrics.halstead.level
old: 0.03820816864295125
new: 0.06262626262626263
path: .spaces[0].metrics.halstead.vocabulary
old: 51.0
new: 49.0
path: .spaces[0].metrics.halstead.N1
old: 117.0
new: 86.0
path: .spaces[0].metrics.halstead.time
old: 1534.097653692498
new: 702.2915296953781
path: .spaces[0].metrics.halstead.volume
old: 1055.0711136066982
new: 791.6740880202444
path: .spaces[0].metrics.halstead.estimated_program_length
old: 238.9889444687201
new: 228.63873564795475
path: .spaces[0].metrics.halstead.difficulty
old: 26.17241379310345
new: 15.96774193548387
path: .spaces[0].metrics.halstead.N2
old: 69.0
new: 55.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.2848867982189252
new: 1.6215513166521611
path: .spaces[0].metrics.halstead.n2
old: 29.0
new: 31.0
path: .spaces[0].metrics.halstead.n1
old: 22.0
new: 18.0
path: .spaces[0].metrics.halstead.bugs
old: 0.30452930112699866
new: 0.1808861723609593
path: .spaces[0].metrics.halstead.length
old: 186.0
new: 141.0
Code
namespace mozilla {
class GeckoScreenOrientation final
: public java::GeckoScreenOrientation::Natives {
GeckoScreenOrientation() = delete;
public:
static void OnOrientationChange(int16_t aOrientation, int16_t aAngle) {
nsCOMPtr screenMgr =
do_GetService("@mozilla.org/gfx/screenmanager;1");
nsCOMPtr screen;
if (!screenMgr ||
NS_FAILED(screenMgr->GetPrimaryScreen(getter_AddRefs(screen))) ||
!screen) {
return;
}
nsIntRect rect;
int32_t colorDepth, pixelDepth;
if (NS_FAILED(
screen->GetRect(&rect.x, &rect.y, &rect.width, &rect.height)) ||
NS_FAILED(screen->GetColorDepth(&colorDepth)) ||
NS_FAILED(screen->GetPixelDepth(&pixelDepth))) {
return;
}
hal::NotifyScreenConfigurationChange(hal::ScreenConfiguration(
rect, static_cast(aOrientation), aAngle,
colorDepth, pixelDepth));
}
};
} // namespace mozilla