do-you-bench
Advanced tools
Comparing version 2.0.2 to 2.0.3
#!/usr/bin/env node | ||
const { promptQuestion } = require("./src/consolePrompter") | ||
const { executeShell } = require("./src/execute") | ||
const { executeShell, generateCommand } = require("./src/execute") | ||
const chalk = require("chalk") | ||
@@ -31,5 +31,6 @@ const figlet = require("figlet") | ||
const executables = await promptQuestion(prompts) | ||
executeShell(executables) | ||
const cmd = generateCommand(executables) | ||
executeShell(cmd) | ||
} | ||
run() |
{ | ||
"name": "do-you-bench", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Simple interactive http[s] benchmarking tool", | ||
"main": "cli.js", | ||
"scripts": { | ||
"test": "echo 'no tests'", | ||
"test": "jest", | ||
"format": "prettier --no-semi --tab-width 2 --print-width 100 --write **/*.js" | ||
@@ -9,0 +9,0 @@ }, |
const shell = require("shelljs") | ||
const executeShell = (input = {}) => { | ||
const cmd = `ab -n ${input.requests} -c ${input.concurrency} ${input.protocol}://${ | ||
const executeShell = cmd => { | ||
shell.exec(cmd) | ||
} | ||
const generateCommand = (input = {}) => { | ||
return `ab -n ${input.requests} -c ${input.concurrency} ${input.protocol}://www.${ | ||
input.hostname | ||
}/${input.path}` | ||
shell.exec(cmd) | ||
} | ||
module.exports = { | ||
executeShell | ||
executeShell, | ||
generateCommand | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
1775771
10
111
1