MCPcopy Index your code
hub / github.com/Haiyang-Sun/nodeprof.js

github.com/Haiyang-Sun/nodeprof.js @09.12.2019

Chat with this repo
repository ↗ · DeepWiki ↗ · release 09.12.2019 ↗ · + Follow
716 symbols 2,157 edges 159 files 115 documented · 16%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Build Status

An efficient instrumentation and profiling framework for Graal.js.

Getting Started

Get the mx build tool:

git clone https://github.com/graalvm/mx.git

Download and set the JAVA_HOME to the given JDK needed for building:

wget https://github.com/graalvm/openjdk8-jvmci-builder/releases/download/jvmci-0.46/openjdk-8u172-jvmci-0.46-linux-amd64.tar.gz
tar xvf openjdk-8u172-jvmci-0.46-linux-amd64.tar.gz
export JAVA_HOME=PATH_TO_THIS_JDK

Get dependent projects and build:

mkdir workspace-nodeprof
cd workspace-nodeprof
git clone https://github.com/Haiyang-Sun/nodeprof.js.git
cd nodeprof.js
mx sforceimports
mx build

Run tests:

mx test-all

Detailed explanation can be found in the Tutorial;

Goals

The goals of NodeProf are:

  • Use AST-level instrumentation which can benefit from the partial evaluation of the Graal compiler and have a much lower overhead compared to source-code instrumentation framework such as Jalangi
  • Compatible to analysis written in Jalangi detail.
  • Comprehensive coverage for NPM modules and Node.js libraries.
  • Compliant to the latest ECMAScript specification (thanks to Graal.js)

Author

  • Haiyang Sun
    • haiyang.sun@usi.ch
    • Università della Svizzera italiana (USI), Lugano, Switzerland

Publication

  • Efficient dynamic analysis for Node.js link

Licence

NodeProf is available under the following license:

Acknowledgement

Thanks to Daniele Bonetta, Alexander Jordan, and Christian Humer from Oracle Labs for the help during the implementation.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 517
Class 98
Function 96
Enum 3
Interface 2

Languages

Java85%
TypeScript13%
Python3%

Modules by API surface

src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/analysis/NodeProfAnalysis.java22 symbols
src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/handlers/BaseEventHandlerNode.java19 symbols
src/ch.usi.inf.nodeprof.test/src/ch/usi/inf/nodeprof/test/examples/EventLogger.java19 symbols
mx.nodeprof/mx_nodeprof.py18 symbols
src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/jalangi/factory/AbstractFactory.java16 symbols
src/ch.usi.inf.nodeprof.test/src/ch/usi/inf/nodeprof/test/examples/tests/EventLoggerTest.java16 symbols
src/ch.usi.inf.nodeprof.test/src/ch/usi/inf/nodeprof/test/examples/TypedArray.java16 symbols
src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/utils/RawEventsTracingSupport.java14 symbols
src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/NodeProfInstrument.java14 symbols
src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/utils/SourceMapping.java13 symbols
src/ch.usi.inf.nodeprof/src/ch/usi/inf/nodeprof/analysis/AnalysisFilterSourceList.java13 symbols
src/ch.usi.inf.nodeprof.test/src/ch/usi/inf/nodeprof/test/TestableNodeProfAnalysis.java13 symbols

For agents

$ claude mcp add nodeprof.js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page