Global Metrics
path: .metrics.nom.total
old: 8.0
new: 12.0
path: .metrics.nom.functions
old: 8.0
new: 12.0
path: .metrics.loc.lloc
old: 33.0
new: 29.0
path: .metrics.loc.cloc
old: 12.0
new: 57.0
path: .metrics.loc.blank
old: 12.0
new: 19.0
path: .metrics.loc.sloc
old: 116.0
new: 147.0
path: .metrics.loc.ploc
old: 92.0
new: 71.0
path: .metrics.cognitive.average
old: 1.375
new: 1.0
path: .metrics.cognitive.sum
old: 11.0
new: 12.0
path: .metrics.cyclomatic.average
old: 2.0
new: 1.7857142857142858
path: .metrics.cyclomatic.sum
old: 20.0
new: 25.0
path: .metrics.nargs.sum
old: 18.0
new: 3.0
path: .metrics.nargs.average
old: 2.25
new: 0.25
path: .metrics.nexits.average
old: 1.0
new: 0.5833333333333334
path: .metrics.nexits.sum
old: 8.0
new: 7.0
path: .metrics.halstead.level
old: 0.034585569469290395
new: 0.01820359281437126
path: .metrics.halstead.n2
old: 58.0
new: 38.0
path: .metrics.halstead.time
old: 3593.8416774904153
new: 7041.436740289686
path: .metrics.halstead.difficulty
old: 28.91379310344828
new: 54.93421052631579
path: .metrics.halstead.vocabulary
old: 84.0
new: 63.0
path: .metrics.halstead.N1
old: 221.0
new: 219.0
path: .metrics.halstead.effort
old: 64689.150194827474
new: 126745.86132521436
path: .metrics.halstead.n1
old: 26.0
new: 25.0
path: .metrics.halstead.purity_ratio
old: 1.3199266582544786
new: 0.8174032390031719
path: .metrics.halstead.bugs
old: 0.5371551071403574
new: 0.8410747658079393
path: .metrics.halstead.estimated_program_length
old: 461.9743303890675
new: 315.51765025522434
path: .metrics.halstead.volume
old: 2237.311097972566
new: 2307.230050470968
path: .metrics.halstead.N2
old: 129.0
new: 167.0
path: .metrics.halstead.length
old: 350.0
new: 386.0
path: .metrics.mi.mi_sei
old: 21.332903695428477
new: 31.61459112210449
path: .metrics.mi.mi_original
old: 49.28408279436803
new: 44.13721664157768
path: .metrics.mi.mi_visual_studio
old: 28.82110104933803
new: 25.81123780209221
Spaces Data
Minimal test - lines (19, 145)
path: .spaces[0].metrics.cyclomatic.average
old: 2.111111111111111
new: 1.8461538461538465
path: .spaces[0].metrics.cyclomatic.sum
old: 19.0
new: 24.0
path: .spaces[0].metrics.nexits.sum
old: 8.0
new: 7.0
path: .spaces[0].metrics.nexits.average
old: 1.0
new: 0.5833333333333334
path: .spaces[0].metrics.halstead.n1
old: 26.0
new: 25.0
path: .spaces[0].metrics.halstead.difficulty
old: 29.78181818181818
new: 58.088235294117645
path: .spaces[0].metrics.halstead.effort
old: 65517.854249810545
new: 126091.85847937282
path: .spaces[0].metrics.halstead.n2
old: 55.0
new: 34.0
path: .spaces[0].metrics.halstead.level
old: 0.033577533577533576
new: 0.017215189873417722
path: .spaces[0].metrics.halstead.length
old: 347.0
new: 369.0
path: .spaces[0].metrics.halstead.vocabulary
old: 81.0
new: 59.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 440.18621691552465
new: 289.07014134687967
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.2685481755490624
new: 0.7833879169292132
path: .spaces[0].metrics.halstead.volume
old: 2199.9279510009646
new: 2170.6952852145196
path: .spaces[0].metrics.halstead.time
old: 3639.880791656142
new: 7005.103248854046
path: .spaces[0].metrics.halstead.N1
old: 221.0
new: 211.0
path: .spaces[0].metrics.halstead.bugs
old: 0.5417328718761555
new: 0.8381790003513212
path: .spaces[0].metrics.halstead.N2
old: 126.0
new: 158.0
path: .spaces[0].metrics.nargs.sum
old: 18.0
new: 3.0
path: .spaces[0].metrics.nargs.average
old: 2.25
new: 0.25
path: .spaces[0].metrics.nom.functions
old: 8.0
new: 12.0
path: .spaces[0].metrics.nom.total
old: 8.0
new: 12.0
path: .spaces[0].metrics.mi.mi_original
old: 51.5272549665013
new: 47.053594623002255
path: .spaces[0].metrics.mi.mi_sei
old: 17.30878284766014
new: 34.77818080606327
path: .spaces[0].metrics.mi.mi_visual_studio
old: 30.132897641228833
new: 27.516722001755703
path: .spaces[0].metrics.cognitive.sum
old: 11.0
new: 12.0
path: .spaces[0].metrics.cognitive.average
old: 1.375
new: 1.0
path: .spaces[0].metrics.loc.cloc
old: 5.0
new: 46.0
path: .spaces[0].metrics.loc.lloc
old: 33.0
new: 29.0
path: .spaces[0].metrics.loc.sloc
old: 103.0
new: 127.0
path: .spaces[0].metrics.loc.blank
old: 9.0
new: 16.0
path: .spaces[0].metrics.loc.ploc
old: 89.0
new: 65.0
Code
class nsTPriorityQueue {
public:
typedef typename nsTArray::size_type size_type;
/**
* Default constructor also creates a comparator object using the default
* constructor for type Compare.
*/
nsTPriorityQueue() : mCompare(Compare()) {}
/**
* Constructor to allow a specific instance of a comparator object to be
* used.
*/
explicit nsTPriorityQueue(const Compare& aComp) : mCompare(aComp) {}
nsTPriorityQueue(nsTPriorityQueue&&) = default;
nsTPriorityQueue& operator=(nsTPriorityQueue&&) = default;
/**
* @return True if the queue is empty or false otherwise.
*/
bool IsEmpty() const { return mElements.IsEmpty(); }
/**
* @return The number of elements in the queue.
*/
size_type Length() const { return mElements.Length(); }
/**
* @return The topmost element in the queue without changing the queue. This
* is the element 'a' such that there is no other element 'b' in the queue for
* which Compare(b, a) returns true. (Since this container does not check
* for duplicate entries there may exist 'b' for which Compare(a, b) returns
* false.)
*/
const T& Top() const {
MOZ_ASSERT(!mElements.IsEmpty(), "Empty queue");
return mElements[0];
}
/**
* Adds an element to the queue
* @param aElement The element to add
* @return true on success, false on out of memory.
*/
void Push(T&& aElement) {
mElements.AppendElement(std::move(aElement));
// Sift up
size_type i = mElements.Length() - 1;
while (i) {
size_type parent = (size_type)((i - 1) / 2);
if (mCompare.LessThan(mElements[parent], mElements[i])) {
break;
}
std::swap(mElements[i], mElements[parent]);
i = parent;
}
}
/**
* Removes and returns the top-most element from the queue.
* @return The topmost element, that is, the element 'a' such that there is no
* other element 'b' in the queue for which Compare(b, a) returns true.
* @see Top()
*/
T Pop() {
MOZ_ASSERT(!mElements.IsEmpty(), "Empty queue");
T pop = std::move(mElements[0]);
const size_type newLength = mElements.Length() - 1;
if (newLength == 0) {
mElements.Clear();
return pop;
}
// Move last to front
mElements[0] = mElements.PopLastElement();
// Sift down
size_type i = 0;
while (2 * i + 1 < newLength) {
size_type swap = i;
size_type l_child = 2 * i + 1;
if (mCompare.LessThan(mElements[l_child], mElements[i])) {
swap = l_child;
}
size_type r_child = l_child + 1;
if (r_child < newLength &&
mCompare.LessThan(mElements[r_child], mElements[swap])) {
swap = r_child;
}
if (swap == i) {
break;
}
std::swap(mElements[i], mElements[swap]);
i = swap;
}
return pop;
}
/**
* Removes all elements from the queue.
*/
void Clear() { mElements.Clear(); }
/**
* Provides readonly access to the queue elements as an array. Generally this
* should be avoided but may be needed in some situations such as when the
* elements contained in the queue need to be enumerated for cycle-collection.
* @return A pointer to the first element of the array. If the array is
* empty, then this pointer must not be dereferenced.
*/
const T* Elements() const { return mElements.Elements(); }
nsTPriorityQueue Clone() const {
auto res = nsTPriorityQueue{mCompare};
res.mElements = mElements.Clone();
return res;
}
protected:
nsTArray mElements;
Compare mCompare; // Comparator object
};
Minimal test - lines (33, 33)
path: .spaces[0].spaces[1].metrics.mi.mi_visual_studio
old: 89.84306917940205
new: 89.52267462886361
path: .spaces[0].spaces[1].metrics.mi.mi_sei
old: 146.04458498874996
new: 145.25416890283572
path: .spaces[0].spaces[1].metrics.mi.mi_original
old: 153.6316482967775
new: 153.0837736153568
path: .spaces[0].spaces[1].metrics.halstead.volume
old: 27.0
new: 30.0
path: .spaces[0].spaces[1].metrics.halstead.n2
old: 3.0
new: 4.0
path: .spaces[0].spaces[1].metrics.halstead.length
old: 9.0
new: 10.0
path: .spaces[0].spaces[1].metrics.halstead.effort
old: 67.5
new: 75.0
path: .spaces[0].spaces[1].metrics.halstead.bugs
old: 0.005526047247960579
new: 0.005928155507483437
path: .spaces[0].spaces[1].metrics.halstead.n1
old: 5.0
new: 4.0
path: .spaces[0].spaces[1].metrics.halstead.N1
old: 6.0
new: 5.0
path: .spaces[0].spaces[1].metrics.halstead.purity_ratio
old: 1.81828088628892
new: 1.6
path: .spaces[0].spaces[1].metrics.halstead.estimated_program_length
old: 16.36452797660028
new: 16.0
path: .spaces[0].spaces[1].metrics.halstead.time
old: 3.75
new: 4.166666666666667
path: .spaces[0].spaces[1].metrics.halstead.N2
old: 3.0
new: 5.0
Code
explicit nsTPriorityQueue(const Compare& aComp) : mCompare(aComp) {}
Minimal test - lines (35, 35)
path: .spaces[0].spaces[2].metrics.cyclomatic.sum
old: 1.0
new: 2.0
path: .spaces[0].spaces[2].metrics.cyclomatic.average
old: 1.0
new: 2.0
path: .spaces[0].spaces[2].metrics.mi.mi_original
old: 126.72438210545536
new: 155.48277001781787
path: .spaces[0].spaces[2].metrics.mi.mi_sei
old: 139.16109602350053
new: 148.81700897518124
path: .spaces[0].spaces[2].metrics.mi.mi_visual_studio
old: 74.10782579266396
new: 90.92559650164787
path: .spaces[0].spaces[2].metrics.halstead.purity_ratio
old: 2.0264662506490403
new: 1.6585200677766871
path: .spaces[0].spaces[2].metrics.halstead.volume
old: 31.69925001442312
new: 18.094737505048094
path: .spaces[0].spaces[2].metrics.halstead.effort
old: 95.09775004326936
new: 90.47368752524048
path: .spaces[0].spaces[2].metrics.halstead.bugs
old: 0.006944786620971931
new: 0.006717797984117599
path: .spaces[0].spaces[2].metrics.halstead.n1
old: 6.0
new: 5.0
path: .spaces[0].spaces[2].metrics.halstead.vocabulary
old: 9.0
new: 6.0
path: .spaces[0].spaces[2].metrics.halstead.difficulty
old: 3.0
new: 5.0
path: .spaces[0].spaces[2].metrics.halstead.estimated_program_length
old: 20.264662506490403
new: 11.60964047443681
path: .spaces[0].spaces[2].metrics.halstead.N1
old: 7.0
new: 5.0
path: .spaces[0].spaces[2].metrics.halstead.n2
old: 3.0
new: 1.0
path: .spaces[0].spaces[2].metrics.halstead.N2
old: 3.0
new: 2.0
path: .spaces[0].spaces[2].metrics.halstead.length
old: 10.0
new: 7.0
path: .spaces[0].spaces[2].metrics.halstead.level
old: 0.3333333333333333
new: 0.2
path: .spaces[0].spaces[2].metrics.halstead.time
old: 5.2832083357371875
new: 5.026315973624471
path: .spaces[0].spaces[2].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[2].metrics.nargs.average
old: 0.0
new: 1.0
path: .spaces[0].spaces[2].metrics.loc.ploc
old: 4.0
new: 1.0
path: .spaces[0].spaces[2].metrics.loc.cloc
old: 1.0
new: 0.0
path: .spaces[0].spaces[2].metrics.loc.sloc
old: 5.0
new: 1.0
path: .spaces[0].spaces[2].metrics.loc.lloc
old: 1.0
new: 0.0
Code
nsTPriorityQueue(nsTPriorityQueue&&) = default;
Minimal test - lines (36, 36)
path: .spaces[0].spaces[3].metrics.nargs.sum
old: 3.0
new: 0.0
path: .spaces[0].spaces[3].metrics.nargs.average
old: 3.0
new: 0.0
path: .spaces[0].spaces[3].metrics.nexits.average
old: 1.0
new: 0.0
path: .spaces[0].spaces[3].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[0].spaces[3].metrics.cyclomatic.sum
old: 1.0
new: 2.0
path: .spaces[0].spaces[3].metrics.cyclomatic.average
old: 1.0
new: 2.0
path: .spaces[0].spaces[3].metrics.mi.mi_original
old: 118.2301959978505
new: 154.35924178123315
path: .spaces[0].spaces[3].metrics.mi.mi_sei
old: 94.97108531682082
new: 147.19610035996175
path: .spaces[0].spaces[3].metrics.mi.mi_visual_studio
old: 69.140465495819
new: 90.2685624451656
path: .spaces[0].spaces[3].metrics.halstead.bugs
old: 0.015659671944166023
new: 0.008761351781884417
path: .spaces[0].spaces[3].metrics.halstead.level
old: 0.2857142857142857
new: 0.16666666666666666
path: .spaces[0].spaces[3].metrics.halstead.time
old: 17.88888888888889
new: 7.486279792153612
path: .spaces[0].spaces[3].metrics.halstead.volume
old: 92.0
new: 22.458839376460833
path: .spaces[0].spaces[3].metrics.halstead.purity_ratio
old: 2.094817802929741
new: 1.938721875540867
path: .spaces[0].spaces[3].metrics.halstead.N2
old: 9.0
new: 2.0
path: .spaces[0].spaces[3].metrics.halstead.N1
old: 14.0
new: 6.0
path: .spaces[0].spaces[3].metrics.halstead.length
old: 23.0
new: 8.0
path: .spaces[0].spaces[3].metrics.halstead.difficulty
old: 3.5
new: 6.0
path: .spaces[0].spaces[3].metrics.halstead.vocabulary
old: 16.0
new: 7.0
path: .spaces[0].spaces[3].metrics.halstead.n2
old: 9.0
new: 1.0
path: .spaces[0].spaces[3].metrics.halstead.effort
old: 322.0
new: 134.753036258765
path: .spaces[0].spaces[3].metrics.halstead.estimated_program_length
old: 48.18080946738404
new: 15.509775004326936
path: .spaces[0].spaces[3].metrics.halstead.n1
old: 7.0
new: 6.0
path: .spaces[0].spaces[3].metrics.loc.ploc
old: 6.0
new: 1.0
path: .spaces[0].spaces[3].metrics.loc.sloc
old: 6.0
new: 1.0
path: .spaces[0].spaces[3].metrics.loc.lloc
old: 1.0
new: 0.0
Code
nsTPriorityQueue& operator=(nsTPriorityQueue&&) = default;
Minimal test - lines (46, 46)
path: .spaces[0].spaces[5].metrics.loc.cloc
old: 1.0
new: 0.0
path: .spaces[0].spaces[5].metrics.loc.sloc
old: 7.0
new: 1.0
path: .spaces[0].spaces[5].metrics.loc.ploc
old: 6.0
new: 1.0
path: .spaces[0].spaces[5].metrics.nargs.sum
old: 3.0
new: 0.0
path: .spaces[0].spaces[5].metrics.nargs.average
old: 3.0
new: 0.0
path: .spaces[0].spaces[5].metrics.halstead.n2
old: 9.0
new: 3.0
path: .spaces[0].spaces[5].metrics.halstead.difficulty
old: 3.5
new: 3.3333333333333335
path: .spaces[0].spaces[5].metrics.halstead.N2
old: 9.0
new: 4.0
path: .spaces[0].spaces[5].metrics.halstead.level
old: 0.2857142857142857
new: 0.3
path: .spaces[0].spaces[5].metrics.halstead.n1
old: 7.0
new: 5.0
path: .spaces[0].spaces[5].metrics.halstead.N1
old: 14.0
new: 6.0
path: .spaces[0].spaces[5].metrics.halstead.time
old: 17.88888888888889
new: 5.555555555555555
path: .spaces[0].spaces[5].metrics.halstead.volume
old: 92.0
new: 30.0
path: .spaces[0].spaces[5].metrics.halstead.estimated_program_length
old: 48.18080946738404
new: 16.36452797660028
path: .spaces[0].spaces[5].metrics.halstead.purity_ratio
old: 2.094817802929741
new: 1.6364527976600278
path: .spaces[0].spaces[5].metrics.halstead.vocabulary
old: 16.0
new: 8.0
path: .spaces[0].spaces[5].metrics.halstead.bugs
old: 0.015659671944166023
new: 0.007181448966772944
path: .spaces[0].spaces[5].metrics.halstead.effort
old: 322.0
new: 100.0
path: .spaces[0].spaces[5].metrics.halstead.length
old: 23.0
new: 10.0
path: .spaces[0].spaces[5].metrics.mi.mi_sei
old: 119.00080523126265
new: 145.25416890283572
path: .spaces[0].spaces[5].metrics.mi.mi_visual_studio
old: 67.68009063429763
new: 89.52267462886361
path: .spaces[0].spaces[5].metrics.mi.mi_original
old: 115.73295498464891
new: 153.0837736153568
Code
size_type Length() const { return mElements.Length(); }
Minimal test - lines (65, 78)
path: .spaces[0].spaces[7].metrics.nargs.sum
old: 2.0
new: 1.0
path: .spaces[0].spaces[7].metrics.nargs.average
old: 2.0
new: 1.0
path: .spaces[0].spaces[7].metrics.cyclomatic.sum
old: 1.0
new: 4.0
path: .spaces[0].spaces[7].metrics.cyclomatic.average
old: 1.0
new: 4.0
path: .spaces[0].spaces[7].metrics.halstead.level
old: 0.2222222222222222
new: 0.0625
path: .spaces[0].spaces[7].metrics.halstead.n1
old: 8.0
new: 15.0
path: .spaces[0].spaces[7].metrics.halstead.difficulty
old: 4.5
new: 16.0
path: .spaces[0].spaces[7].metrics.halstead.estimated_program_length
old: 48.0
new: 117.20671786825557
path: .spaces[0].spaces[7].metrics.halstead.bugs
old: 0.019048812623618388
new: 0.10772523832187111
path: .spaces[0].spaces[7].metrics.halstead.N2
old: 9.0
new: 32.0
path: .spaces[0].spaces[7].metrics.halstead.effort
old: 432.0
new: 5809.758465200486
path: .spaces[0].spaces[7].metrics.halstead.purity_ratio
old: 2.0
new: 1.5838745657872373
path: .spaces[0].spaces[7].metrics.halstead.length
old: 24.0
new: 74.0
path: .spaces[0].spaces[7].metrics.halstead.n2
old: 8.0
new: 15.0
path: .spaces[0].spaces[7].metrics.halstead.N1
old: 15.0
new: 42.0
path: .spaces[0].spaces[7].metrics.halstead.vocabulary
old: 16.0
new: 30.0
path: .spaces[0].spaces[7].metrics.halstead.time
old: 24.0
new: 322.7643591778048
path: .spaces[0].spaces[7].metrics.halstead.volume
old: 96.0
new: 363.1099040750304
path: .spaces[0].spaces[7].metrics.mi.mi_original
old: 120.96249522293483
new: 96.67480237689848
path: .spaces[0].spaces[7].metrics.mi.mi_sei
old: 98.91295985907472
new: 84.2942166540613
path: .spaces[0].spaces[7].metrics.mi.mi_visual_studio
old: 70.7383012999619
new: 56.53497215023303
path: .spaces[0].spaces[7].metrics.cognitive.average
old: 0.0
new: 3.0
path: .spaces[0].spaces[7].metrics.cognitive.sum
old: 0.0
new: 3.0
path: .spaces[0].spaces[7].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[0].spaces[7].metrics.nexits.average
old: 1.0
new: 0.0
path: .spaces[0].spaces[7].metrics.loc.blank
old: 0.0
new: 1.0
path: .spaces[0].spaces[7].metrics.loc.cloc
old: 0.0
new: 1.0
path: .spaces[0].spaces[7].metrics.loc.sloc
old: 5.0
new: 14.0
path: .spaces[0].spaces[7].metrics.loc.ploc
old: 5.0
new: 12.0
path: .spaces[0].spaces[7].metrics.loc.lloc
old: 2.0
new: 6.0
Code
void Push(T&& aElement) {
mElements.AppendElement(std::move(aElement));
// Sift up
size_type i = mElements.Length() - 1;
while (i) {
size_type parent = (size_type)((i - 1) / 2);
if (mCompare.LessThan(mElements[parent], mElements[i])) {
break;
}
std::swap(mElements[i], mElements[parent]);
i = parent;
}
}
Minimal test - lines (55, 58)
path: .spaces[0].spaces[6].metrics.cyclomatic.average
old: 3.0
new: 1.0
path: .spaces[0].spaces[6].metrics.cyclomatic.sum
old: 3.0
new: 1.0
path: .spaces[0].spaces[6].metrics.nargs.average
old: 3.0
new: 0.0
path: .spaces[0].spaces[6].metrics.nargs.sum
old: 3.0
new: 0.0
path: .spaces[0].spaces[6].metrics.mi.mi_sei
old: 77.93369131693993
new: 105.49597390658572
path: .spaces[0].spaces[6].metrics.mi.mi_original
old: 94.21975739004348
new: 125.5254928495536
path: .spaces[0].spaces[6].metrics.mi.mi_visual_studio
old: 55.09927332751081
new: 73.40672096465123
path: .spaces[0].spaces[6].metrics.cognitive.average
old: 4.0
new: 0.0
path: .spaces[0].spaces[6].metrics.cognitive.sum
old: 4.0
new: 0.0
path: .spaces[0].spaces[6].metrics.loc.sloc
old: 19.0
new: 4.0
path: .spaces[0].spaces[6].metrics.loc.ploc
old: 18.0
new: 4.0
path: .spaces[0].spaces[6].metrics.loc.lloc
old: 6.0
new: 2.0
path: .spaces[0].spaces[6].metrics.loc.cloc
old: 1.0
new: 0.0
path: .spaces[0].spaces[6].metrics.halstead.volume
old: 235.0219859070546
new: 80.0
path: .spaces[0].spaces[6].metrics.halstead.length
old: 50.0
new: 20.0
path: .spaces[0].spaces[6].metrics.halstead.level
old: 0.12280701754385966
new: 0.1944444444444444
path: .spaces[0].spaces[6].metrics.halstead.difficulty
old: 8.142857142857142
new: 5.142857142857143
path: .spaces[0].spaces[6].metrics.halstead.n1
old: 12.0
new: 9.0
path: .spaces[0].spaces[6].metrics.halstead.estimated_program_length
old: 96.32251891746031
new: 48.18080946738404
path: .spaces[0].spaces[6].metrics.halstead.purity_ratio
old: 1.9264503783492064
new: 2.4090404733692017
path: .spaces[0].spaces[6].metrics.halstead.bugs
old: 0.051380968182114135
new: 0.018439184525994783
path: .spaces[0].spaces[6].metrics.halstead.time
old: 106.31946981509611
new: 22.857142857142858
path: .spaces[0].spaces[6].metrics.halstead.vocabulary
old: 26.0
new: 16.0
path: .spaces[0].spaces[6].metrics.halstead.N1
old: 31.0
new: 12.0
path: .spaces[0].spaces[6].metrics.halstead.n2
old: 14.0
new: 7.0
path: .spaces[0].spaces[6].metrics.halstead.N2
old: 19.0
new: 8.0
path: .spaces[0].spaces[6].metrics.halstead.effort
old: 1913.75045667173
new: 411.42857142857144
Code
const T& Top() const {
MOZ_ASSERT(!mElements.IsEmpty(), "Empty queue");
return mElements[0];
}
Minimal test - lines (41, 41)
path: .spaces[0].spaces[4].metrics.cognitive.sum
old: 7.0
new: 0.0
path: .spaces[0].spaces[4].metrics.cognitive.average
old: 7.0
new: 0.0
path: .spaces[0].spaces[4].metrics.loc.ploc
old: 43.0
new: 1.0
path: .spaces[0].spaces[4].metrics.loc.cloc
old: 2.0
new: 0.0
path: .spaces[0].spaces[4].metrics.loc.lloc
old: 22.0
new: 1.0
path: .spaces[0].spaces[4].metrics.loc.sloc
old: 45.0
new: 1.0
path: .spaces[0].spaces[4].metrics.mi.mi_original
old: 70.67294542709855
new: 153.0837736153568
path: .spaces[0].spaces[4].metrics.mi.mi_sei
old: 43.216200751454785
new: 145.25416890283572
path: .spaces[0].spaces[4].metrics.mi.mi_visual_studio
old: 41.32920785210442
new: 89.52267462886361
path: .spaces[0].spaces[4].metrics.nexits.sum
old: 4.0
new: 1.0
path: .spaces[0].spaces[4].metrics.nexits.average
old: 4.0
new: 1.0
path: .spaces[0].spaces[4].metrics.cyclomatic.average
old: 9.0
new: 1.0
path: .spaces[0].spaces[4].metrics.cyclomatic.sum
old: 9.0
new: 1.0
path: .spaces[0].spaces[4].metrics.halstead.length
old: 191.0
new: 10.0
path: .spaces[0].spaces[4].metrics.halstead.volume
old: 1137.251495283893
new: 30.0
path: .spaces[0].spaces[4].metrics.halstead.estimated_program_length
old: 309.460345528164
new: 17.509775004326936
path: .spaces[0].spaces[4].metrics.halstead.level
old: 0.0472636815920398
new: 0.2222222222222222
path: .spaces[0].spaces[4].metrics.halstead.bugs
old: 0.27782077878057077
new: 0.008772053214638597
path: .spaces[0].spaces[4].metrics.halstead.time
old: 1336.7693014740498
new: 7.5
path: .spaces[0].spaces[4].metrics.halstead.n1
old: 24.0
new: 6.0
path: .spaces[0].spaces[4].metrics.halstead.difficulty
old: 21.157894736842103
new: 4.5
path: .spaces[0].spaces[4].metrics.halstead.effort
old: 24061.847426532895
new: 135.0
path: .spaces[0].spaces[4].metrics.halstead.n2
old: 38.0
new: 2.0
path: .spaces[0].spaces[4].metrics.halstead.purity_ratio
old: 1.6202112331317486
new: 1.7509775004326935
path: .spaces[0].spaces[4].metrics.halstead.N2
old: 67.0
new: 3.0
path: .spaces[0].spaces[4].metrics.halstead.vocabulary
old: 62.0
new: 8.0
path: .spaces[0].spaces[4].metrics.halstead.N1
old: 124.0
new: 7.0
path: .spaces[0].spaces[4].metrics.nargs.sum
old: 5.0
new: 0.0
path: .spaces[0].spaces[4].metrics.nargs.average
old: 5.0
new: 0.0
Code
bool IsEmpty() const { return mElements.IsEmpty(); }
Minimal test - lines (27, 27)
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 3.0
new: 1.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 3.0
new: 1.0
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 2.067970000576925
new: 1.188721875540867
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 6.0
new: 3.0
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 3.0
new: 1.5
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 9.0
new: 5.0
path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.3333333333333333
new: 0.6666666666666666
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 31.019550008653873
new: 9.509775004326936
path: .spaces[0].spaces[0].metrics.halstead.time
old: 8.962406251802891
new: 1.723308333814104
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 53.77443751081734
new: 20.67970000576925
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.009878177657674504
new: 0.003290806962640765
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 161.32331253245204
new: 31.019550008653873
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 12.0
new: 6.0
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 6.0
new: 3.0
path: .spaces[0].spaces[0].metrics.halstead.length
old: 15.0
new: 8.0
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 6.0
new: 3.0
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 132.2515302053208
new: 155.01840677617037
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 115.19959464458498
new: 148.0452545698808
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 77.34007614346245
new: 90.65403905039204
path: .spaces[0].spaces[0].metrics.nargs.sum
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nargs.average
old: 1.0
new: 0.0
Code
nsTPriorityQueue() : mCompare(Compare()) {}