Skip to content
/ audrey Public

On Demand Run time Information powered by Truffle

Notifications You must be signed in to change notification settings

rathrio/audrey

Repository files navigation

Audrey

Build Status Coverage Status

On Demand Runtime Information.

Prerequisites

Ensure that the environment variable $JAVA_HOME points to your GraalVM home folder, e.g.

export JAVA_HOME=/Users/radi/graalvm-ee-1.0.0-rc12/Contents/Home

Ensure that a redis server is running, e.g.

redis-cli ping
# => PONG

Gathering data

  1. To let your GraalVM installation at $JAVA_HOME know about Audrey, run:

    ./gradlew install

    This will build a fat JAR and place it in $JAVA_HOME/jre/tools/audrey.

  2. Verify your installation by running

    $JAVA_HOME/bin/js --jvm --help:tools | grep audrey

    If you see some output describing --audrey flags and switches, the installation was successful.

  3. Run your application and provide the following flags to enable data-gathering with Audrey:

    $JAVA_HOME/bin/js --jvm --audrey --audrey.Project="<my_unique_project_name>" path/to/app.js 

    For example:

    $JAVA_HOME/bin/js --jvm --audrey --audrey.Project="test" --audrey.FilterPath="add.js" projects/javascript/test_project/add.js

Consult --jvm --help:tools for a more exhaustive list of options.

Starting a language server

To start a language server from the project root for debugging purposes, run:

./gradlew startServer

This should start a server that waits for clients to connect to port 8123 (by default).

To make an executable globally available to language clients, ensure that bin/audrey-ls is in your path, e.g.

ln -sr bin/audrey-ls /usr/local/bin/audrey-ls

You should now be able to start a language server that communicates via stdin/out with audrey-ls.

Setting up additional test projects

The project directory contains sub folders for each Truffle language to test with. By default you should find a simple test project for each of them, e.g.

projects/javascript
└── test_project
  └── ...

projects/ruby
└── test_project
  └── ...

projects/r
└── test_project
  └── ...

To pull additional sample projects to test Audrey with:

git submodule update --init --recursive

To update them:

git submodule update --recursive --remote