Skip to content

Repository files navigation

Accelerant

Setup

Prerequisites: Accelerant is currently designed for use on x86 Linux.

  1. Git clone
  2. Install uv if not already installed
  3. Install Linux perf
  4. If you want support for sending flamegraphs to the LLM:
  5. cargo install flamegraph
  6. cargo install resvg

Basic usage

First, run sudo sh -c 'echo 1 >/proc/sys/kernel/perf_event_paranoid' to get more accurate profiling of code that (transitively) uses syscalls.

In the accelerant repository, run:

$ uv run accelerant_server.py

In a separate terminal, run:

$ curl 'http://127.0.0.1:5000/optimize?project=PATH_TO_PROJECT_ROOT&targetBinary=target/release/REST_OF_PATH_TO_EXECUTABLE_TO_OPTIMIZE'

Accelerant will automatically build, run, and profile your project using cargo and perf. Note that the target binary path must be the version built with a release profile.

If you've already run the perf profiler and collected a perf.data file, you can give it to Accelerant by appending a perfDataPath query parameter with the path to the file.

Also, if you know a particular line in your project is a hotspot, you can pass the (relative) path to its containing file in a filename parameter, with the line number in line.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages