Global Metrics
path: .metrics.nom.total
old: 0.0
new: 20.0
path: .metrics.nom.functions
old: 0.0
new: 20.0
path: .metrics.loc.sloc
old: 21.0
new: 375.0
path: .metrics.loc.blank
old: 5.0
new: 44.0
path: .metrics.loc.cloc
old: 5.0
new: 48.0
path: .metrics.loc.ploc
old: 11.0
new: 283.0
path: .metrics.loc.lloc
old: 0.0
new: 85.0
path: .metrics.cyclomatic.average
old: 1.0
new: 2.761904761904762
path: .metrics.cyclomatic.sum
old: 3.0
new: 58.0
path: .metrics.halstead.N1
old: 12.0
new: 785.0
path: .metrics.halstead.effort
old: 230.62877457581985
new: 441574.5376293387
path: .metrics.halstead.estimated_program_length
old: 27.11941547876375
new: 1651.4940596344622
path: .metrics.halstead.time
old: 12.812709698656656
new: 24531.91875718548
path: .metrics.halstead.bugs
old: 0.012535867877963309
new: 1.9329239200529948
path: .metrics.halstead.length
old: 20.0
new: 1354.0
path: .metrics.halstead.level
old: 0.3
new: 0.023998545542694386
path: .metrics.halstead.n2
old: 6.0
new: 198.0
path: .metrics.halstead.difficulty
old: 3.3333333333333335
new: 41.66919191919192
path: .metrics.halstead.vocabulary
old: 11.0
new: 227.0
path: .metrics.halstead.volume
old: 69.18863237274594
new: 10597.1466517919
path: .metrics.halstead.N2
old: 8.0
new: 569.0
path: .metrics.halstead.n1
old: 5.0
new: 29.0
path: .metrics.halstead.purity_ratio
old: 1.3559707739381874
new: 1.219714962802409
path: .metrics.cognitive.sum
old: 0.0
new: 39.0
path: .metrics.cognitive.average
old: null
new: 1.95
path: .metrics.nargs.average
old: null
new: 0.95
path: .metrics.nargs.sum
old: 0.0
new: 19.0
path: .metrics.mi.mi_original
old: 98.95718630817196
new: 13.448430066912849
path: .metrics.mi.mi_visual_studio
old: 57.869699595422205
new: 7.864578986498742
path: .metrics.mi.mi_sei
old: 101.66789442476684
new: -24.07776436991271
path: .metrics.nexits.sum
old: 0.0
new: 29.0
path: .metrics.nexits.average
old: null
new: 1.45
Spaces Data
Minimal test - lines (24, 36)
path: .spaces[0].metrics.nargs.average
old: null
new: 2.0
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[0].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[0].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 1.0
path: .spaces[0].metrics.loc.blank
old: 4.0
new: 0.0
path: .spaces[0].metrics.loc.ploc
old: 10.0
new: 12.0
path: .spaces[0].metrics.loc.cloc
old: 0.0
new: 2.0
path: .spaces[0].metrics.loc.sloc
old: 14.0
new: 13.0
path: .spaces[0].metrics.halstead.n2
old: 5.0
new: 18.0
path: .spaces[0].metrics.halstead.N1
old: 12.0
new: 34.0
path: .spaces[0].metrics.halstead.difficulty
old: 3.5
new: 8.25
path: .spaces[0].metrics.halstead.length
old: 19.0
new: 67.0
path: .spaces[0].metrics.halstead.volume
old: 63.11663380285988
new: 318.5774626449524
path: .spaces[0].metrics.halstead.effort
old: 220.90821831000957
new: 2628.264066820858
path: .spaces[0].metrics.halstead.level
old: 0.2857142857142857
new: 0.12121212121212122
path: .spaces[0].metrics.halstead.estimated_program_length
old: 23.21928094887362
new: 103.58797503894242
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.2220674183617697
new: 1.5460891796857077
path: .spaces[0].metrics.halstead.time
old: 12.272678795000532
new: 146.01467037893653
path: .spaces[0].metrics.halstead.vocabulary
old: 10.0
new: 27.0
path: .spaces[0].metrics.halstead.bugs
old: 0.012181104265035592
new: 0.06348309282578855
path: .spaces[0].metrics.halstead.n1
old: 5.0
new: 9.0
path: .spaces[0].metrics.halstead.N2
old: 7.0
new: 33.0
path: .spaces[0].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].metrics.nexits.average
old: null
new: 1.0
path: .spaces[0].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[0].metrics.mi.mi_original
old: 106.2333526662533
new: 99.24571899658444
path: .spaces[0].metrics.mi.mi_sei
old: 77.76511879540814
new: 96.12899796656188
path: .spaces[0].metrics.mi.mi_visual_studio
old: 62.12476764108381
new: 58.03843216174528
path: .spaces[0].metrics.cyclomatic.sum
old: 2.0
new: 1.0
Code
static PaperInfo MakePaperInfo(const nsAString& aName,
const cups_size_t& aMedia) {
// XXX Do we actually have the guarantee that this is utf-8?
NS_ConvertUTF8toUTF16 paperId(aMedia.media); // internal paper name/ID
return PaperInfo(
paperId, aName,
{aMedia.width * kPointsPerHundredthMillimeter,
aMedia.length * kPointsPerHundredthMillimeter},
Some(gfx::MarginDouble{aMedia.top * kPointsPerHundredthMillimeter,
aMedia.right * kPointsPerHundredthMillimeter,
aMedia.bottom * kPointsPerHundredthMillimeter,
aMedia.left * kPointsPerHundredthMillimeter}));
}