-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:nodejs/node into test-spawn-fix
Merge
- Loading branch information
Showing
1,058 changed files
with
31,351 additions
and
28,193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
'use strict'; | ||
|
||
const common = require('../common.js'); | ||
const assert = require('assert'); | ||
const bench = common.createBenchmark(main, { | ||
source: [ | ||
'array', | ||
'arraybuffer', | ||
'arraybuffer-middle', | ||
'buffer', | ||
'uint8array', | ||
'string', | ||
'string-base64' | ||
], | ||
len: [10, 2048], | ||
n: [1024] | ||
}); | ||
|
||
function main(conf) { | ||
const len = +conf.len; | ||
const n = +conf.n; | ||
|
||
const array = new Array(len).fill(42); | ||
const arrayBuf = new ArrayBuffer(len); | ||
const str = 'a'.repeat(len); | ||
const buffer = Buffer.allocUnsafe(len); | ||
const uint8array = new Uint8Array(len); | ||
|
||
var i; | ||
|
||
switch (conf.source) { | ||
case 'array': | ||
bench.start(); | ||
for (i = 0; i < n * 1024; i++) { | ||
Buffer.from(array); | ||
} | ||
bench.end(n); | ||
break; | ||
case 'arraybuffer': | ||
bench.start(); | ||
for (i = 0; i < n * 1024; i++) { | ||
Buffer.from(arrayBuf); | ||
} | ||
bench.end(n); | ||
break; | ||
case 'arraybuffer-middle': | ||
const offset = ~~(len / 4); | ||
const length = ~~(len / 2); | ||
bench.start(); | ||
for (i = 0; i < n * 1024; i++) { | ||
Buffer.from(arrayBuf, offset, length); | ||
} | ||
bench.end(n); | ||
break; | ||
case 'buffer': | ||
bench.start(); | ||
for (i = 0; i < n * 1024; i++) { | ||
Buffer.from(buffer); | ||
} | ||
bench.end(n); | ||
break; | ||
case 'uint8array': | ||
bench.start(); | ||
for (i = 0; i < n * 1024; i++) { | ||
Buffer.from(uint8array); | ||
} | ||
bench.end(n); | ||
break; | ||
case 'string': | ||
bench.start(); | ||
for (i = 0; i < n * 1024; i++) { | ||
Buffer.from(str); | ||
} | ||
bench.end(n); | ||
break; | ||
case 'string-base64': | ||
bench.start(); | ||
for (i = 0; i < n * 1024; i++) { | ||
Buffer.from(str, 'base64'); | ||
} | ||
bench.end(n); | ||
break; | ||
default: | ||
assert.fail(null, null, 'Should not get here'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#### I'm opening this issue because: | ||
|
||
- [ ] npm is crashing. | ||
- [ ] npm is producing an incorrect install. | ||
- [ ] npm is doing something I don't understand. | ||
- [ ] Other (_see below for feature requests_): | ||
|
||
#### What's going wrong? | ||
|
||
#### How can the CLI team reproduce the problem? | ||
|
||
<!-- | ||
Please a complete description of how to reproduce the problem. | ||
Include a gist of your npm-debug.log file. | ||
If you've never used gist.github.com, start here: | ||
https://github.com/EmmaRamirez/how-to-submit-your-npm-debug-log | ||
--> | ||
|
||
### supporting information: | ||
|
||
- `npm -v` prints: | ||
- `node -v` prints: | ||
- `npm config get registry` prints: | ||
- Windows, OS X, or Linux?: | ||
- Network issues: | ||
- Geographic location where npm was run: | ||
- [ ] I use a proxy to connect to the npm registry. | ||
- [ ] I use a proxy to connect to the web. | ||
- [ ] I use a proxy when downloading Git repos. | ||
- [ ] I access the npm registry via a VPN | ||
- [ ] I don't use a proxy, but have limited or unreliable internet access. | ||
- Container: | ||
- [ ] I develop using Vagrant on Windows. | ||
- [ ] I develop using Vagrant on OS X or Linux. | ||
- [ ] I develop / deploy using Docker. | ||
- [ ] I deploy to a PaaS (Triton, Heroku). | ||
|
||
<!-- | ||
Thank you for contributing to npm! Please review this checklist | ||
before submitting your issue. | ||
- Please check if there's a solution in the troubleshooting wiki: | ||
https://github.com/npm/npm/wiki/Troubleshooting | ||
- Also ensure that your new issue conforms to npm's contribution guidelines: | ||
https://github.com/npm/npm/wiki/Contributing-Guidelines | ||
- Participation in this open source project is subject to the npm Code of Conduct: | ||
https://www.npmjs.com/policies/conduct | ||
For feature requests, delete the above and uncomment the section following this one. But first, review the existing feature requests | ||
and make sure there isn't one that already describes the feature | ||
you'd like to see added: | ||
https://github.com/npm/npm/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+label%3Aalready-looked-at | ||
--> | ||
|
||
<!-- | ||
#### What's the feature? | ||
#### What problem is the feature intended to solve? | ||
#### Is the absence of this feature blocking you or your team? If so, how? | ||
#### Is this feature similar to an existing feature in another tool? | ||
#### Is this a feature you're prepared to implement, with support from the npm CLI team? | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
sudo: false | ||
# need to declare the language as well as the matrix below | ||
language: node_js | ||
node_js: | ||
# LTS is our most important target | ||
- "4" | ||
# next LTS and master is next most important | ||
- "6" | ||
# still in LTS maintenance until fall 2016 | ||
# (also still in wide use) | ||
- "0.10" | ||
# will be unsupported as soon as 6 becomes LTS and 7 released | ||
- "5" | ||
# technically in LTS / distros, unbeloved | ||
- "0.12" | ||
env: | ||
- DEPLOY_VERSION=testing | ||
# having top-level `env:` adds a phantom build | ||
# https://github.com/travis-ci/travis-ci/issues/4681 | ||
#env: DEPLOY_VERSION=testing | ||
matrix: | ||
include: | ||
# LTS is our most important target | ||
- node_js: "4" | ||
# DEPLOY_VERSION is used to set the couchapp setup mode for test/tap/registry.js | ||
# only gather coverage info for LTS | ||
env: DEPLOY_VERSION=testing COVERALLS_REPO_TOKEN="$COVERALLS_OPTIONAL_TOKEN" | ||
# next LTS and master is next most important | ||
- node_js: "6" | ||
env: DEPLOY_VERSION=testing | ||
# still in LTS maintenance until fall 2016 (also still in wide use) | ||
- node_js: "0.10" | ||
env: DEPLOY_VERSION=testing | ||
# will be unsupported as soon as 6 becomes LTS and 7 released | ||
- node_js: "5" | ||
env: DEPLOY_VERSION=testing | ||
# technically in LTS / distros, unbeloved | ||
- node_js: "0.12" | ||
env: DEPLOY_VERSION=testing | ||
before_install: | ||
- "npm config set spin false" | ||
- "node . install -g ." | ||
# required by test/tap/registry.js | ||
- "mkdir -p /var/run/couchdb" | ||
sudo: false | ||
script: "npm test" | ||
notifications: | ||
slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.