Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Drop testing Node 0.6, update sauce-tunnel dep, and cleanup readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Jun 16, 2014
1 parent fc292a8 commit 76c5ab3
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 51 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
node_js:
- "0.6"
- "0.8"
- "0.10"
env:
Expand Down Expand Up @@ -29,7 +28,7 @@ branches:
only:
- master
before_install:
- "[ $SAUCE_LABS == false ] || npm i chalk@\"^0.4.0\" ecstatic@\"^0.5.0\" request@\"^2.34.0\" sauce-tunnel-sc3-1@\"^1.0.0\""
- "[ $SAUCE_LABS == false ] || npm i chalk@\"^0.4.0\" ecstatic@\"^0.5.0\" request@\"^2.36.0\" sauce-tunnel@\"^2.0.0\""
- "[ $ISTANBUL == false ] || npm i -g coveralls@\"^2.10.0\" istanbul@\"^0.2.0\""
- "[ $BIN != 'narwhal' ] || (wget https://benchmarkjs.com/_travis/narwhal-0.3.2.zip && sudo unzip narwhal-0.3.2 -d /opt/ && rm narwhal-0.3.2.zip)"
- "[ $BIN != 'narwhal' ] || (sudo ln -s /opt/narwhal-0.3.2/bin/narwhal /usr/local/bin/narwhal && sudo chmod +x /usr/local/bin/narwhal)"
Expand Down
81 changes: 34 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
# Benchmark.js <sup>v1.0.0</sup>
# Benchmark.js v1.0.0

A [robust](https://calendar.perfplanet.com/2010/bulletproof-javascript-benchmarks/ "Bulletproof JavaScript benchmarks") benchmarking library that works on nearly all JavaScript platforms<sup><a name="fnref1" href="#fn1">1</a></sup>, supports high-resolution timers, and returns statistically significant results. As seen on [jsPerf](https://jsperf.com/).
A [robust](https://calendar.perfplanet.com/2010/bulletproof-javascript-benchmarks/ "Bulletproof JavaScript benchmarks") benchmarking library that works on nearly all JavaScript platforms, supports high-resolution timers, & returns statistically significant results. As seen on [jsPerf](https://jsperf.com/).

## Download

* [Development source](https://raw.github.com/bestiejs/benchmark.js/v1.0.0/benchmark.js)
## Documentation

## Dive in
* [API Documentation](https://benchmarkjs.com/docs)
* Check out our [unit tests](https://benchmarkjs.com/tests) & [roadmap](https://github.com/bestiejs/benchmark.js/wiki/Roadmap)

We’ve got [API docs](https://benchmarkjs.com/docs) and [unit tests](https://benchmarkjs.com/tests).

For a list of upcoming features, check out our [roadmap](https://github.com/bestiejs/benchmark.js/wiki/Roadmap).

## Support
## Download

Tested in Chrome 34-35, Firefox 28-29, IE 6-11, Opera 20-21, Safari 5-7, Node.js 0.6.21~0.10.28, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.
* [Development source](https://raw.github.com/bestiejs/benchmark.js/v1.0.0/benchmark.js)

## Installation and usage
## Installation

Benchmark.js’ only hard dependency is [Lo-Dash](https://lodash.com/).
Include [platform.js](https://mths.be/platform) to populate [Benchmark.platform](https://benchmarkjs.com/docs#platform).
Expand All @@ -37,51 +32,39 @@ Optionally, expose Java’s nanosecond timer by adding the `nano` applet to the

Or enable Chrome’s microsecond timer by using the [command line switch](https://peter.sh/experiments/chromium-command-line-switches/#enable-benchmarking):

--enable-benchmarking

Via [npm](https://npmjs.org/):

```bash
npm install benchmark
```
--enable-benchmarking
```

In [Node.js](https://nodejs.org/) and [RingoJS v0.8.0+](https://ringojs.org/):
In an AMD loader:

```js
var Benchmark = require('benchmark');
require({
'paths': {
'benchmark': 'path/to/benchmark',
'lodash': 'path/to/lodash',
'platform': 'path/to/platform'
}
},
['benchmark'], function(Benchmark) {/**/});
```

Optionally, use the [microtime module](https://github.com/wadey/node-microtime) by Wade Simmons:
Using npm:

```bash
npm install microtime
```

In [RingoJS v0.7.0-](https://ringojs.org/):

```js
var Benchmark = require('benchmark').Benchmark;
$ npm i --save benchmark
```

In [Rhino](https://www.mozilla.org/rhino/):
In Node.js:

```js
load('benchmark.js');
var Benchmark = require('benchmark');
```

In an AMD loader like [RequireJS](http:https://requirejs.org/):
Optionally, use the [microtime module](https:https://github.com/wadey/node-microtime) by Wade Simmons:

```js
require({
'paths': {
'benchmark': 'path/to/benchmark',
'lodash': 'path/to/lodash',
'platform': 'path/to/platform'
}
},
['benchmark'], function(Benchmark) {
console.log(Benchmark.platform.name);
});
```bash
npm install microtime
```

Usage example:
Expand All @@ -107,14 +90,18 @@ suite.add('RegExp#test', function() {
.run({ 'async': true });

// logs:
// > RegExp#test x 4,161,532 +-0.99% (59 cycles)
// > String#indexOf x 6,139,623 +-1.00% (131 cycles)
// > Fastest is String#indexOf
// => RegExp#test x 4,161,532 +-0.99% (59 cycles)
// => String#indexOf x 6,139,623 +-1.00% (131 cycles)
// => Fastest is String#indexOf
```

## Support

Tested in Chrome 34-35, Firefox 29-30, IE 6-11, Opera 21-22, Safari 5-7, Node.js 0.8.26~0.10.28, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.

## BestieJS

Benchmark.js is part of the BestieJS *"Best in Class"* module collection. This means we promote solid browser/environment support, ES5+ precedents, unit testing, and plenty of documentation.
Benchmark.js is part of the BestieJS *Best in Class* module collection. This means we promote solid browser/environment support, ES5+ precedents, unit testing, & plenty of documentation.

## Authors

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "benchmark",
"version": "1.0.0",
"description": "A benchmarking library that works on nearly all JavaScript platforms, supports high-resolution timers, and returns statistically significant results.",
"description": "A benchmarking library that works on nearly all JavaScript platforms, supports high-resolution timers, & returns statistically significant results.",
"homepage": "https://benchmarkjs.com/",
"license": "MIT",
"main": "benchmark.js",
Expand Down
2 changes: 1 addition & 1 deletion test/saucelabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
var _ = require('../vendor/lodash/dist/lodash.compat.js'),
ecstatic = require('ecstatic'),
request = require('request'),
SauceTunnel = require('sauce-tunnel-sc3-1');
SauceTunnel = require('sauce-tunnel');

/** Used by `logInline` to clear previously logged messages */
var prevLine = '';
Expand Down

0 comments on commit 76c5ab3

Please sign in to comment.