Skip to content

Commit 084ae22

Browse files
committed
Merge branch 'release/v2.4.0'
2 parents 4de761b + 645e3a6 commit 084ae22

File tree

7 files changed

+2932
-33
lines changed

7 files changed

+2932
-33
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
11
1+
14

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ JavaScript performance tests for Handsontable
44

55
## Install
66

7-
The minimal Node version which this project can run on is 11. Make sure that your version meets that criteria before
7+
The minimal Node version which this project can run on is 14. Make sure that your version meets that criteria before
88
you continue with the installation.
99

1010
Install dependencies via [NPM](https://npmjs.com/)
@@ -60,6 +60,7 @@ Arguments:
6060
- ```--hot-server``` - Selects a server to be used to serve the Handsontable assets. For example `--hot-server=http://localhost:8082`. If
6161
used the assets are loaded from `dist` directory, such as `http://localhost:8082/dist/handsontable.full.css`.
6262
- ```--test-name``` - The name under which the test will be saved. For example `--test-name=my-feature`. If a test by that name is already stored, it will be replaced with the new test results.
63+
- ```--cpu-throttle-rate``` - The argument sets the CPU throttle rate for the browser. Adjusting the clock speed of the CPU slows down the computer. This can be useful for detecting slight deviations in performance that normally cannot be seen on a fast computer. It's advisable to perform the tests with rate sets as 4, for example, `--cpu-throttle-rate=4`.
6364

6465
## License
6566

lib/cli.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ function parseArgs() {
3030
.option('--hot-version <version>', 'The Handsontable <version> which will be used for running a benchmark.', hotVersionRegExp)
3131
.option('--hot-server <url>', 'The server <url> which will be used to serve Handsontable assets from.')
3232
.option('--test-name <name>', 'The <name> name under which the test will be saved.')
33+
.option('--cpu-throttle-rate <number>', 'The <number> CPU throttle rate.')
3334
.action(async (args, options) => {
3435
await require('./commands/local-server')('test-runner', config.SERVER_PORT, options);
3536

lib/commands/protractor/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
const { fork } = require('child_process');
22

3-
module.exports = function ({ hotVersion = 'latest', hotServer, testName } = {}) {
3+
module.exports = function ({ hotVersion = 'latest', cpuThrottleRate = 0, hotServer, testName } = {}) {
44
console.log('Running protractor...');
55

66
const env = process.env;
77

88
env.HOT_VERSION = testName ? testName : (hotServer ? 'develop' : hotVersion);
9+
env.CPU_THROTTLE_RATE = cpuThrottleRate;
910

1011
const childProcess = fork('./node_modules/.bin/protractor', ['protractor.conf.js'], { env });
1112

0 commit comments

Comments
 (0)