Giter Site home page Giter Site logo

ebuckle / codewind-node-profiler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eclipse-archived/codewind-node-profiler

0.0 1.0 0.0 1.55 MB

Provides automatic code highlighting of 'hot' node.js methods

Home Page: https://codewind.dev

License: Eclipse Public License 2.0

Shell 0.69% TypeScript 99.00% JavaScript 0.31%

codewind-node-profiler's Introduction

platforms License Chat

Installing and running the Codewind language server for Node.js profiling

The Codewind language server for Node.js profiling annotates your Node.js code with code highlighting. Code highlighting uses the profiling data gathered through Codewind load testing to highlight and show the relative time that is spent in JavaScript functions.

Demonstration of Code Highlighting

Running the extension with Visual Studio Code (VS Code)

  1. Open a local project that you created with Codewind and profiled by using the performance test feature. Opening the project creates profiling data in a load-test/[datestamp]/profiling.json file in your Codewind project.
  2. In VS Code, open a JavaScript file in your project. The extension highlights any lines that it finds in the profiling data and annotates them to show how often they were seen and where they were called from.

Developing the extension with VS Code

  1. Clone the codewind-node-profiler repository locally.
  2. Run npm install in the cloned codewind-ls-node-prof folder. This command installs all necessary npm modules in both the client and server folder.
  3. Open the clone of the codewind-node-profiler repository in VS Code.
  4. Press Ctrl+Shift+B on Windows or Cmd+Shift+B on Mac to compile the client and server.
  5. Switch to the Debug view.
  6. Click Launch Client from the menu and click the Run icon.
  7. If you want to debug the server and use the launch configuration, click Attach to Server.

Testing

To enable testing, run the npm install command in the codewind-ls-node-prof folder.

Complete the following steps to test in VS Code:

  1. Press Ctrl+Shift+B on Windows or Cmd+Shift+B on Mac to compile the client and server.
  2. Run npm run prepare-tests in the vscode/client folder.
  3. Switch to the Debug view.
  4. Select Language Server E2E Test from the menu.
  5. Run the test configuration.
  6. Another editor opens while the tests are run. It automatically closes after the tests are complete.
  7. Switch to the Output view with Ctrl+Shift+U on Windows and Cmd+Shift+U on Mac to see the test results.

Building the extension

Complete the following steps to build a .vsix extension package that can then be installed and published:

  1. Run npm install in the codewind-ls-node-prof folder.
  2. Install the vsce package globally with npm install -g vsce.
  3. Run vsce package in the codewind-ls-node-prof folder. A vsix file is generated.

Installing the extension

Complete the following steps to install the extension:

  1. Run code --install-extension <name of generated vsix file> in the codewind-ls-node-prof folder.
  2. Restart Visual Studio Code. The extension appears in your list of installed extensions.

For more information, see Publishing Extension on the VS Code website.

codewind-node-profiler's People

Contributors

sishida avatar tobespc avatar nikcanvin avatar josephca avatar

Watchers

James Cloos 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.