Git Product home page Git Product logo

jsperf's Introduction

JSPerf for NodeJS

Version Build Status Downloads Dependencies

This command line utility helps you run performance tests from http://jsperf.com locally with NodeJS.

Installation

npm install jsperf -g

Warning

The tool runs the code fetched from jsperf.com w/o any processing. This can be very dangerous. Review the tests before running or use disposable sandboxes

This also means that browser-dependant tests will not run (at least with the current version). Fetch only pure JS tests.

Usage

Create a folder for your local tests:

mkdir my-jsperf-tests

Initialize your tests:

cd my-jsperf-tests
jsperf init

Get a test:

jsperf get <test-slug> <revision>

For instance:

jsperf get replace-vs-split-join-vs-replaceall 67

Preview a test:

jsperf preview replace-vs-split-join-vs-replaceall 67

Run a test:

jsperf run replace-vs-split-join-vs-replaceall 67

Results:

jsperf results

License

LICENSE

jsperf's People

Contributors

orkon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jsperf's Issues

Add support for CLI options

Currently CLI doesn't accept options for opts parameter in JsPerf constructor (e.g. host).

Can the support for them be added to CLI?

jsperf init throws 'spawn npm ENOENT' on Windows

jsperf init throws

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: spawn npm ENOENT
    at exports._errnoException (util.js:855:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:455:9)
    at process._tickCallback (node.js:369:17)
    at Function.Module.runMain (module.js:432:11)
    at startup (node.js:141:18)
    at node.js:980:3

and results in empty project json (no benchmark beautify-benchmark dev dependencies):

  {
    "name": "jsperf.com",
    "version": "0.1.0",
    "private": true,
    "description": "Run jsperf.com tests locally with your NodeJS version",
    "dependencies": {
    },
    "devDependencies": {
    }
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.