https://github.com/stealjs/steal-benchmark
A module that you can use to create benchmark tests that run when all modules have been loaded.
https://github.com/stealjs/steal-benchmark
Last synced: 2 months ago
JSON representation
A module that you can use to create benchmark tests that run when all modules have been loaded.
- Host: GitHub
- URL: https://github.com/stealjs/steal-benchmark
- Owner: stealjs
- License: mit
- Created: 2015-05-14T22:05:46.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-07-24T21:30:42.000Z (almost 8 years ago)
- Last Synced: 2025-02-21T13:48:09.721Z (3 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/steal-benchmark
- Size: 2.93 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# steal-benchmark
Runs [Benchmark.js] suites, in order, after all [StealJS](http://stealjs.com) modules have loaded.
## Install
> npm install steal-benchmark --save-dev
## Use
`import`, `require`, or use `define` to load the `"steal-benchmark"` dependency.
It provides a `suite(name)` method that returns a [Benchmark.Suite](http://benchmarkjs.com/docs#Suite).
This is the same as calling `new Benchmark.Suite(name)` except the suite will
queued to run after all modules have been loaded.Example:
```
var b = require("steal-benchmark");b.suite("A")
.add("a1", function(){
/o/.test('Hello World!');
})
.add("a2", function(){
'Hello World!'.indexOf('o') > -1;
});b.suite("B")
.add("b1", function(){
!!'Hello World!'.match(/o/);
})
.add("b2", function(){
'Hello World!'.indexOf('o') > -1;
});
```