diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2018-11-11 16:44:19 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2018-11-20 05:14:34 +0800 |
commit | a365bb9cb100514efc3f57f7fac03d0679f73ff5 (patch) | |
tree | 447ea47ec5cee90a2c326849328dee21ee6c25d0 /benchmark/fixtures | |
parent | 5f25dd1e2eaa73ffb0a51e6d5b5150bcd5d0447e (diff) | |
download | android-node-v8-a365bb9cb100514efc3f57f7fac03d0679f73ff5.tar.gz android-node-v8-a365bb9cb100514efc3f57f7fac03d0679f73ff5.tar.bz2 android-node-v8-a365bb9cb100514efc3f57f7fac03d0679f73ff5.zip |
benchmark: pre-generate data set for URL benchmarks
This patch:
- Introduces `common.bakeUrlData` which can be used to pre-generate
the data set for the URL benchmarks to loop through instead of
looping over a constant.
- Add the option to use WPT data in benchmarks for better diversity
in the input
- Add the option to benchmark URL parsing with base URLs (whatwg only)
- Moves the data in `benchmark/fixtures/url-inputs.js` to
`benchmark/common.js`
PR-URL: https://github.com/nodejs/node/pull/24302
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/fixtures')
-rw-r--r-- | benchmark/fixtures/url-inputs.js | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/benchmark/fixtures/url-inputs.js b/benchmark/fixtures/url-inputs.js deleted file mode 100644 index 7b1983f6fa..0000000000 --- a/benchmark/fixtures/url-inputs.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -exports.urls = { - long: 'http://nodejs.org:89/docs/latest/api/foo/bar/qua/13949281/0f28b/' + - '/5d49/b3020/url.html#test?payload1=true&payload2=false&test=1' + - '&benchmark=3&foo=38.38.011.293&bar=1234834910480&test=19299&3992&' + - 'key=f5c65e1e98fe07e648249ad41e1cfdb0', - short: 'https://nodejs.org/en/blog/', - idn: 'http://你好你好.在线', - auth: 'https://user:pass@example.com/path?search=1', - file: 'file:///foo/bar/test/node.js', - ws: 'ws://localhost:9229/f46db715-70df-43ad-a359-7f9949f39868', - javascript: 'javascript:alert("node is awesome");', - percent: 'https://%E4%BD%A0/foo', - dot: 'https://example.org/./a/../b/./c' -}; - -exports.searchParams = { - noencode: 'foo=bar&baz=quux&xyzzy=thud', - multicharsep: 'foo=bar&&&&&&&&&&baz=quux&&&&&&&&&&xyzzy=thud', - encodefake: 'foo=%©ar&baz=%A©uux&xyzzy=%©ud', - encodemany: '%66%6F%6F=bar&%62%61%7A=quux&xyzzy=%74h%75d', - encodelast: 'foo=bar&baz=quux&xyzzy=thu%64', - multivalue: 'foo=bar&foo=baz&foo=quux&quuy=quuz', - multivaluemany: 'foo=bar&foo=baz&foo=quux&quuy=quuz&foo=abc&foo=def&' + - 'foo=ghi&foo=jkl&foo=mno&foo=pqr&foo=stu&foo=vwxyz', - manypairs: 'a&b&c&d&e&f&g&h&i&j&k&l&m&n&o&p&q&r&s&t&u&v&w&x&y&z', - manyblankpairs: '&&&&&&&&&&&&&&&&&&&&&&&&', - altspaces: 'foo+bar=baz+quux&xyzzy+thud=quuy+quuz&abc=def+ghi' -}; |