Socket
Socket
Sign inDemoInstall

benchd

Package Overview
Dependencies
44
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    benchd

Benchmark JavaScript code across different node.js/io.js versions from the browser


Version published
Maintainers
1
Install size
3.39 MB
Created

Readme

Source

Description

benchd is a tool for benchmarking JavaScript code across different node.js/io.js versions from the browser.

Requirements

  • Backend: node.js -- v0.10.0 or newer

  • Frontend: Any modern browser with WebSocket support

Install

npm install -g benchd

Config

Configuration is achieved by a JSON formatted config file. If the BENCHD_CONF environment variable is set and points to a valid file, that will be used. Otherwise the server will look in the current working directory for benchd.conf. If that also fails, then defaults will be used. Any command-line arguments of the same names will override any other config source.

Available config options:

  • address - string - This is the address the server listens on. Default: 0.0.0.0

  • jobAbandonTimeout - integer - This is the amount of time in milliseconds to allow a job's owner to be disconnected before removing (and stopping, if currently executing) the job. Default: 30 * 1000

  • maxConcurrency - integer - This is the maximum number of target processes that are allowed to run at any given time. Set to -1 as an alias for the number of available CPUs. Default: 1

  • maxJobSize - integer - This is the maximum size (in bytes) for a job (the JSON stringified version, including all benchmarks). Default: 512 * 1024

  • maxQueued - integer - This is the maximum number of queued jobs. Default: 1000

  • port - integer - This is the port the server listens on. Default: 80

  • targetsPath - string - This is the directory containing the target executables to make available for benchmarking against. Default: (current working directory)

  • timeout - integer - This is the target process timeout in milliseconds. Default: 5 * 60 * 1000

  • vanilla - boolean - Restrict benchmark code to a "pure"/vanilla JavaScript environment (e.g. no require(), process, etc.). If you disable this and are making the server public, PLEASE start the server in an appropriately protected environment. Default: true

Todo

  • Add support for async ("deferred") option for benchmarks

  • Better WebSocket error handling

  • Add per-benchmark timeout configuration option

  • Ability to easily share benchmark results (can load from/save to gist right now, but no easy way to discover benchmarks)

  • Add support for remote targets (e.g. via ssh) for multi-platform benchmarking

  • Tests

Keywords

FAQs

Last updated on 20 Nov 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc