Global Metrics

path: .metrics.mi.mi_sei
old: -11.16398405518597
new: -11.184622346641284

path: .metrics.mi.mi_visual_studio
old: 17.591093612916424
new: 17.582727897399565

path: .metrics.mi.mi_original
old: 30.080770078087085
new: 30.066464704553255

path: .metrics.halstead.purity_ratio
old: 1.055572183753704
new: 1.0526722601719631

path: .metrics.halstead.difficulty
old: 35.39393939393939
new: 35.63636363636363

path: .metrics.halstead.time
old: 9910.82515162206
new: 10006.197068059044

path: .metrics.halstead.level
old: 0.02825342465753425
new: 0.02806122448979592

path: .metrics.halstead.bugs
old: 1.0563316479623168
new: 1.0630975483491336

path: .metrics.halstead.length
old: 726.0
new: 728.0

path: .metrics.halstead.volume
old: 5040.265530876288
new: 5054.150559886966

path: .metrics.halstead.effort
old: 178394.85272919707
new: 180111.5472250628

path: .metrics.halstead.N2
old: 292.0
new: 294.0

Spaces Data

Minimal test - lines (100, 142)

path: .spaces[5].metrics.halstead.difficulty
old: 23.17073170731707
new: 23.634146341463413

path: .spaces[5].metrics.halstead.length
old: 219.0
new: 221.0

path: .spaces[5].metrics.halstead.N2
old: 100.0
new: 102.0

path: .spaces[5].metrics.halstead.bugs
old: 0.321642877660619
new: 0.3278985473923931

path: .spaces[5].metrics.halstead.level
old: 0.0431578947368421
new: 0.04231166150670795

path: .spaces[5].metrics.halstead.effort
old: 29973.868010154936
new: 30852.55400387728

path: .spaces[5].metrics.halstead.volume
old: 1293.6090404382655
new: 1305.4228216294823

path: .spaces[5].metrics.halstead.purity_ratio
old: 1.371553675546893
new: 1.359141425089455

path: .spaces[5].metrics.halstead.time
old: 1665.214889453052
new: 1714.0307779931825

path: .spaces[5].metrics.mi.mi_original
old: 70.50956338226328
new: 70.46229032941676

path: .spaces[5].metrics.mi.mi_visual_studio
old: 41.23366279664519
new: 41.206017736501025

path: .spaces[5].metrics.mi.mi_sei
old: 27.041144028869155
new: 26.972943429959813

Code

function performance_entrylist_checker(type)
{
    const entryType = type;

    function entry_check(entry, expectedNames, testDescription = '')
    {
        const msg = testDescription + 'Entry \"' + entry.name + '\" should be one that we have set.';
        wp_test(function() { assert_in_array(entry.name, expectedNames, msg); }, msg);
        test_equals(entry.entryType, entryType, testDescription + 'entryType should be \"' + entryType + '\".');
        if (type === "measure") {
            test_true(isFinite(entry.startTime), testDescription + 'startTime should be a number.');
            test_true(isFinite(entry.duration), testDescription + 'duration should be a number.');
        } else if (type === "mark") {
            test_greater_than(entry.startTime, 0, testDescription + 'startTime should greater than 0.');
            test_equals(entry.duration, 0, testDescription + 'duration of mark should be 0.');
        }
    }

    function entrylist_order_check(entryList)
    {
        let inOrder = true;
        for (let i = 0; i < entryList.length - 1; ++i)
        {
            if (entryList[i + 1].startTime < entryList[i].startTime) {
                inOrder = false;
                break;
            }
        }
        return inOrder;
    }

    function entrylist_check(entryList, expectedLength, expectedNames, testDescription = '')
    {
        test_equals(entryList.length, expectedLength, testDescription + 'There should be ' + expectedLength + ' entries.');
        test_true(entrylist_order_check(entryList), testDescription + 'Entries in entrylist should be in order.');
        for (let i = 0; i < entryList.length; ++i)
        {
            entry_check(entryList[i], expectedNames, testDescription + 'Entry_list ' + i + '. ');
        }
    }

    return{"entrylist_check":entrylist_check};
}

Minimal test - lines (104, 116)

path: .spaces[5].spaces[0].metrics.halstead.level
old: 0.10869565217391304
new: 0.10638297872340426

path: .spaces[5].spaces[0].metrics.halstead.N2
old: 46.0
new: 47.0

path: .spaces[5].spaces[0].metrics.halstead.volume
old: 518.0575847114416
new: 523.1868677283866

path: .spaces[5].spaces[0].metrics.halstead.effort
old: 4766.129779345262
new: 4917.956556646834

path: .spaces[5].spaces[0].metrics.halstead.length
old: 101.0
new: 102.0

path: .spaces[5].spaces[0].metrics.halstead.bugs
old: 0.09440376630807248
new: 0.09639811403403566

path: .spaces[5].spaces[0].metrics.halstead.difficulty
old: 9.2
new: 9.4

path: .spaces[5].spaces[0].metrics.halstead.purity_ratio
old: 1.4783731256756607
new: 1.4638792715023698

path: .spaces[5].spaces[0].metrics.halstead.time
old: 264.7849877414035
new: 273.2198087026019

path: .spaces[5].spaces[0].metrics.mi.mi_original
old: 96.02737111104037
new: 95.97613916953672

path: .spaces[5].spaces[0].metrics.mi.mi_sei
old: 63.24463953710713
new: 63.17072746916469

path: .spaces[5].spaces[0].metrics.mi.mi_visual_studio
old: 56.15635737487741
new: 56.12639717516767

Code

    function entry_check(entry, expectedNames, testDescription = '')
    {
        const msg = testDescription + 'Entry \"' + entry.name + '\" should be one that we have set.';
        wp_test(function() { assert_in_array(entry.name, expectedNames, msg); }, msg);
        test_equals(entry.entryType, entryType, testDescription + 'entryType should be \"' + entryType + '\".');
        if (type === "measure") {
            test_true(isFinite(entry.startTime), testDescription + 'startTime should be a number.');
            test_true(isFinite(entry.duration), testDescription + 'duration should be a number.');
        } else if (type === "mark") {
            test_greater_than(entry.startTime, 0, testDescription + 'startTime should greater than 0.');
            test_equals(entry.duration, 0, testDescription + 'duration of mark should be 0.');
        }
    }

Minimal test - lines (131, 139)

path: .spaces[5].spaces[2].metrics.mi.mi_original
old: 105.3190985377658
new: 105.23589676276434

path: .spaces[5].spaces[2].metrics.mi.mi_sei
old: 76.44612889812703
new: 76.32609410993922

path: .spaces[5].spaces[2].metrics.mi.mi_visual_studio
old: 61.59011610395661
new: 61.54146009518382

path: .spaces[5].spaces[2].metrics.halstead.level
old: 0.10303030303030304
new: 0.0997067448680352

path: .spaces[5].spaces[2].metrics.halstead.time
old: 160.71647337467084
new: 168.7522970434044

path: .spaces[5].spaces[2].metrics.halstead.N2
old: 30.0
new: 31.0

path: .spaces[5].spaces[2].metrics.halstead.bugs
old: 0.0676758955376088
new: 0.06991336582233881

path: .spaces[5].spaces[2].metrics.halstead.difficulty
old: 9.705882352941176
new: 10.029411764705882

path: .spaces[5].spaces[2].metrics.halstead.effort
old: 2892.896520744075
new: 3037.5413467812796

path: .spaces[5].spaces[2].metrics.halstead.purity_ratio
old: 1.7345260662300974
new: 1.7069939064486674

path: .spaces[5].spaces[2].metrics.halstead.volume
old: 298.0560051675714
new: 302.86336008962905

path: .spaces[5].spaces[2].metrics.halstead.length
old: 62.0
new: 63.0

Code

    function entrylist_check(entryList, expectedLength, expectedNames, testDescription = '')
    {
        test_equals(entryList.length, expectedLength, testDescription + 'There should be ' + expectedLength + ' entries.');
        test_true(entrylist_order_check(entryList), testDescription + 'Entries in entrylist should be in order.');
        for (let i = 0; i < entryList.length; ++i)
        {
            entry_check(entryList[i], expectedNames, testDescription + 'Entry_list ' + i + '. ');
        }
    }