Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

do-you-bench

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

do-you-bench - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

tests/command.test.js

5

cli.js
#!/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()

4

package.json
{
"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
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc