1.3.6 • Published 3 years ago

benchmark-javascript v1.3.6

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Benchmark

Counts how much time, memory, cpu spent on specific function.
Additional outputs:
1) Average error per function.
2) Difference between best time function and current one.

Script

add this script in your package.json file

  "scripts": {
    "benchmark": "node ./node_modules/benchmark-javascript/dist/index.js"
  },

Start command

npm run benchmark path iterations runs

path : /folder/folder/file.extension
iterations : should be number
runs : should be number

File should look like

export const functions = {   
    'title': 'functions.ts',   
    'tests': [   
        {   
            'title': 'Function Name',   
            'func': (): number =>{   
                // function body
            },   
        }   
    ]   
};
1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago