benchmarking
Advanced tools
Comparing version 1.1.0 to 2.0.0
{ | ||
"name": "benchmarking", | ||
"version": "1.1.0", | ||
"description": "A benchmarking script that expects promises and number of iterations", | ||
"version": "2.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha test --timeout 90000" | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/selfrefactor/benchmarking" | ||
"url": "git+https://github.com/npm/deprecate-holder.git" | ||
}, | ||
"keywords": [ | ||
"benchmark", | ||
"testing", | ||
"timing" | ||
], | ||
"dependencies": { | ||
"moment": "*", | ||
"async": "*" | ||
}, | ||
"devDependencies": { | ||
"unexpected": "*", | ||
"screaper": "*", | ||
"mocha": "*", | ||
"bluebird": "*" | ||
}, | ||
"author": { | ||
"name": "self_refactor" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/selfrefactor/benchmarking/issues" | ||
"url": "https://github.com/npm/deprecate-holder/issues" | ||
}, | ||
"homepage": "https://github.com/selfrefactor/benchmarking" | ||
"homepage": "https://github.com/npm/deprecate-holder#readme" | ||
} |
@@ -1,72 +0,5 @@ | ||
# benchmark-cream | ||
# Deprecated Package | ||
Wrap a promise and send it to loop N times and receive back a time period in seconds. Use the result for benchmarking purposes. | ||
This package is no longer supported and has been deprecated. To avoid malicious use, npm is hanging on to the package name. | ||
#Motivation | ||
When developing some Node.js module, I wanted to check the speed of different methods. So before writing the code I intended, I decided to publish this script first. | ||
#Example | ||
``` | ||
var Promise = require('bluebird'); | ||
var screaper = require('screaper'); | ||
var Cream = require('./benchmark-cream'); | ||
var options = {selector: "h2", class: "entry-title", endTag: "a", length: "250"}; | ||
var giveMeOnePromise = function () { | ||
return new Promise(function (resolve, reject) { | ||
screaper.action('http://www.prometod.eu/en/', options).then(function (data) { | ||
resolve(data) | ||
}).catch(console.log) | ||
}) | ||
}; | ||
Cream.main(100, giveMeOnePromise, function (result) { | ||
console.log(result) | ||
}) | ||
``` | ||
-giveMeOnePromise - a common pattern to wrap your asynchronous function with new promise | ||
-screaper.action - thenable method under benchmarking. | ||
#API | ||
##main(numberLoops, giveMeOnePromise, callback) | ||
-- numberLoops - number iterations | ||
-- giveMeOnePromise - thenable | ||
-- callback - it returns an object | ||
###.time - time as a number - the period between the start and the finish of benchmarking | ||
###.timeString - time as a string | ||
example output - '38 seconds' | ||
###.data - array of resolved within *giveMeOnePromise* values | ||
For example, if you resolve a *string*, you will get array of strings | ||
example output - [resolvedDataStep1,resolvedDataStep2, ... resolvedDataStepN] | ||
##returnTime | ||
same as *main* but returns only time as number | ||
##each | ||
same as *main* but uses *async's each* and returns time as number | ||
##times | ||
same as *main* but uses *async's times* and returns an array: | ||
index 0 => time as number | ||
index 1 => array of resolved within *giveMeOnePromise* values | ||
#Tests | ||
The tests file is not only show the library in actin, but also shows how cool testing is with [Unexpected](http://unexpected.js.org/). | ||
Please contact support@npmjs.com if you have questions about this package. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 2 instances in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
0
1
674
2
0
6
2
- Removedasync@*
- Removedmoment@*
- Removedasync@3.2.6(transitive)
- Removedmoment@2.30.1(transitive)