flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
20
VISUALIZACION/node_modules/ngraph.forcelayout/perf/test.js
generated
vendored
Executable file
20
VISUALIZACION/node_modules/ngraph.forcelayout/perf/test.js
generated
vendored
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
var graph = require('ngraph.generators').grid(20, 20);
|
||||
|
||||
var Benchmark = require('benchmark');
|
||||
var suite = new Benchmark.Suite;
|
||||
|
||||
// add tests
|
||||
suite.add('Run default', function() {
|
||||
var layout = require('../')(graph);
|
||||
for (var i = 0; i < 20; ++i) {
|
||||
layout.step();
|
||||
}
|
||||
})
|
||||
.on('cycle', function(event) {
|
||||
console.log(String(event.target));
|
||||
})
|
||||
.on('complete', function() {
|
||||
console.log('Fastest is ' + this.filter('fastest').pluck('name'));
|
||||
})
|
||||
// run async
|
||||
.run({ 'async': true });
|
||||
Loading…
Add table
Add a link
Reference in a new issue