0.1.18 • Published 4 years ago

oyo v0.1.18

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

OYO

A benchmark for concurrent performance of Node.js app. Measurements: times/sec, and milliseconds.

Demo

Clone the OYO repo first:

$ git clone https://github.com/hiowenluke/oyo.git

Install the dependencies:

$ cd oyo
$ npm install

Then run the examples:

$ node examples/demo/promise-benchmark.js

The result will be like the following:

Platform info:
macOS Sierra 10.12 x64
Intel(R) Core(TM) i7-4558U CPU @ 2.80GHz x 4
Total Memory 16 GB
Node.js v6.11.2
V8 5.1.281.103
--------------
bluebird            1243519	times/sec
co                  82216	times/sec
native-promise      509002	times/sec
tas.promise         1196860	times/sec

How To Use

Install OYO to your project first:

$ cd /path/to/your/project
$ npm install oyo --save-dev

Then create a folder (such as "benchmark") in your project, and write some test cases in it, for example, see: Tas benchmark. See the blow for more.

Write a benchmark test case

$ node examples/demo/promise-benchmark/tas.promise.js

Write a batch case

$ node examples/demo/promise-benchmark.js

Change mode to milliseconds

$ node examples/usage/mode-milliseconds/tas.promise.js

Enable debug mode

$ node examples/usage/debug/set-via-1.js
$ node examples/usage/debug/set-via-object.js
$ node examples/usage/debug/set-via-true.js

Customize config

$ node examples/usage/customize-config/customize.js

Use json config

$ node examples/usage/config-json/promise-benchmark/tas.promise.js

Callback after all tests is done

$ node examples/usage/callback-after-done/callback.js

Thanks

Thanks to JoshuaWise. Part of the code reference to his promise-comparison ideas.

Licence

MIT

0.1.18

4 years ago

0.1.17

7 years ago

0.1.16

7 years ago

0.1.15

7 years ago

0.1.12

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago