Giter Club home page Giter Club logo

profilingpromisesanalysis's Introduction

Profiling Promises

This project is a profiling tool to detect inefficient promise usage in JavaScript.

Our dynamic analysis leverages the standard Node.js profiling API to observe promise execution.

Quick Start -- Require

The recommended way to run the analysis for general use is to require it as part of test harness setup. The analysis file for this is asyncHooks_require.[jt]s. e.g., for mocha, do something like mocha --require /path/to/asyncHooks_require.ts.

TODO More thorough instructions.

Quick Start -- Interceptor

To instrument any node command using the async hooks analysis, prefix your command with the path of ./async-hooks-interceptor/instrument.

Here are some examples:

  1. You want to instrument the file promiseExample.js.
    • To run this program normally, you would execute node promiseExample.js.
    • To instrument this program, you would execute ./async-hooks-interceptor/instrument node promiseExample.js.
  2. You want to run the test suite for a Node.js project, located at ./project.
    • To run the test suite normally, you would execute cd project; npm test.
    • To instrument the test suite, you would execute cd project; ../async-hooks-interceptor/instrument npm test.

Prior Reading

Promises

https://developers.google.com/web/fundamentals/primers/promises

Potentially Related Work

Visualization

  1. SYNCTRACE: Visual Thread-Interplay Analysis http://www.cs.tufts.edu/comp/250VIS/papers/SyncTrace.pdf

profilingpromisesanalysis's People

Contributors

reallytg avatar

Watchers

Mike avatar  avatar

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.