Skip to content
Myr

test: add benchmark for secure-random-string (#116)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Mark Stosberg · committed by Andrey Sitnik · parent dca4f0d · Browse files · 3 files+16 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+16 added−0 removed

  • tests:+10 added−0 removed
  • other:+6 added−0 removed

3 files+16 added−0 removed

modified:test/benchmark+10 added
2 unmodified lines
3var shortid = require('shortid')4var uuid4 = require('uuid/v4')5var chalk = require('chalk')6var rndm = require('rndm')7var srs = require('secure-random-string')8var uid = require('uid-safe')910var asyncGenerate = require('../async/generate')11var nonSecure = require('../non-secure')
24 unmodified lines
36 })37 .add('shortid', function () {38 shortid()39 })40 .add('secure-random-string', function () {41 srs()42 })43 .add('nanoid/async', {44 defer: true,45 fn: function (defer) {46 async().then(function () {
8 unmodified lines
55 defer.resolve()56 })57 }58 })59 .add('secure-random-string', {60 defer: true,61 fn: function (defer) {62 srs(function () { defer.resolve() })63 }64 })65 .add('uid', {66 defer: true,67 fn: function (defer) {68 uid(14).then(function () {
21 unmodified lines
modified:package.json+1 added
modified:yarn.lock+5 added
7312 unmodified lines
7313 ajv "^6.1.0"7314 ajv-errors "^1.0.0"7315 ajv-keywords "^3.1.0"73167317secure-random-string@^1.1.0:7318 version "1.1.0"7319 resolved "https://registry.yarnpkg.com/secure-random-string/-/secure-random-string-1.1.0.tgz#c47d2f20b6d93db1255edb4dadf5e03188ab978e"7320 integrity sha512-V/h8jqoz58zklNGybVhP++cWrxEPXlLM/6BeJ4e0a8zlb4BsbYRzFs16snrxByPa5LUxCVTD3M6EYIVIHR1fAg==73217322semver-compare@^1.0.0:7323 version "1.0.0"7324 resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"7325 integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
1442 unmodified lines