Skip to content

Commit b6d1449

Browse files
committed
avoid misleading checksum printing
1 parent c930eec commit b6d1449

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

perf/edge-iteration.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ suite.add('Edge iteration', function() {
2222
function addUpWeight(link) {
2323
edgeIterationSumWeight += link.data;
2424
}
25+
}).on('complete', function() {
26+
// Print checksum to make sure we are not optimizing out the loop:
27+
console.log('edge iteration sum weight', edgeIterationSumWeight);
2528
});
2629

2730
suite.add('Edge iteration for multigraph', function() {
@@ -40,14 +43,14 @@ suite.add('Edge iteration for multigraph', function() {
4043
function addUpWeight(link) {
4144
edgeIterationMultigraph += link.data;
4245
}
46+
}).on('complete', function() {
47+
// Print checksum to make sure we are not optimizing out the loop:
48+
console.log('edge iteration multigraph weight', edgeIterationMultigraph);
4349
});
4450

4551

4652
suite.on('cycle', function(event) {
4753
console.log(String(event.target));
48-
console.log('edge iteration sum weight', edgeIterationSumWeight);
49-
console.log('edge iteration multigraph weight', edgeIterationMultigraph);
5054
})
5155
// run async
5256
.run({ 'async': true });
53-

0 commit comments

Comments
 (0)