Questions tagged [benchmark.js]

A robust benchmarking library that works on nearly all JavaScript platforms, supports high-resolution timers, and returns statistically significant results.

Benchmark.js site
Documentation

27 questions
1
vote
0 answers

Watching historical performance data using benchmark.js and a build process

Is there any node.js module that runs benchmark.js and compares previous results (historical data stored in a file) raising warnings if performance changes beyound a certain threshold? I'm aiming for something similar to what is currently achieved…
Adrian Moisa
  • 3,923
  • 7
  • 41
  • 66
1
vote
0 answers

Strange Object vs. Array benchmark result under --debug-brk flag

I want to decide what is best structure in javascript for small tree nodes. Each node have key, value and references to the parent and child nodes (if exists). So I wrote benchmark for testing performance of the nodes creation: var Benchmark =…
alexpods
  • 47,475
  • 10
  • 100
  • 94
1
vote
0 answers

Benchmark.js and Bonsai.js

I'm currently testing some Visualization toolkits performance and have a problem testing bonsai.js. Every time I run the benchmark the chrome renderer crashes, and i can't seem to find the problem because bonsai.js is pretty hard to debug. var i =…
Rene Koller
  • 375
  • 1
  • 6
  • 15
1
vote
2 answers

Using string in benchmark.js

The example app for benchmark.js defines its performance tests as strings rather than JavaScript functions: https://github.com/bestiejs/benchmark.js/blob/master/example/jsperf/index.html#L250 Is there an advantage to defining the performance test in…
monsur
  • 45,581
  • 16
  • 101
  • 95
0
votes
1 answer

Is there a CodeIgniter Benchmark Class equivalent for Laravel 9?

I would like to output nifty little information about the web app and server which uses Laravel. CodeIgniter has a dedicated library called Benchmark (https://codeigniter.com/userguide3/libraries/benchmark.html), and I was wondering if there is a…
0
votes
1 answer

Problem during testing transform-streams (Node.js) with Benchmark.js

I'm trying to benchmark a NodeJS code but I get the following error: events.js:167 throw er; // Unhandled 'error' event ^ Error [ERR_STREAM_WRITE_AFTER_END]: write after end at writeAfterEnd (_stream_writable.js:243:12) at…
0
votes
0 answers

benchmarking server functions

I try to use benchmark.js to get some stats on a node server performance but somehow can't get the server function call and no stats, the only stuff I get - the server starts through the benchmarking script. How to get the stats and not start the…
cur4so
  • 1,750
  • 4
  • 20
  • 28
0
votes
2 answers

How to improve accuracy for individual tests in benchmark.js

I have this jsfiddle where I'm trying to measure performance for some operation of my interest, and I'm constantly getting different accuracy for individual tests. For example here is my last run: using extra assign x 662 ops/sec ±9.20% (57 runs…
Lu4
  • 14,873
  • 15
  • 79
  • 132
0
votes
1 answer

Modifying value of object before pushing to promise array in PouchDB/Benchmark.js

I am currently testing the time it takes to insert a number of different objects in PouchDB either inserting them one-by-one or performing a bulk insert. My approach is retrieving a big generated JSON item and changing the _id using a custom…
Urco
  • 365
  • 3
  • 14
0
votes
1 answer

How to catch and log in the console an error thrown by benchmarked code?

Is there any way to get the original error thrown by the evaluated code? I have a simple benchmark suite similar to the one bellow, nothing special. var suite = new Benchmark.Suite; ... suite.add('Collection Add', function () { …
Adrian Moisa
  • 3,923
  • 7
  • 41
  • 66
0
votes
1 answer

Passing function as arguments in javascript benchmark [passing function vs direct acces]

well i'm building some javascript code and im just curious about benchmark of passing function in argument vs direct access I got following functions testIt(function(){ alert('Hi test'); }); function testIt(func){ func(); }; function…
0
votes
1 answer

How to make the output of multiple JavaScript functions display in HTML?

So I'm trying to display the results of a few function calls in a JavaScript file that uses benchmark.js in a separate HTML file. My js file looks something like this (disregard the names of methods and classes): class.init(function(context) { …
Chiefy
  • 119
  • 5
1
2