- Git clone
- Install
uvif not already installed - To fix perf debuginfo issues:
cargo install addr2line --features="bin"
First, build your target program with optimizations on and debuginfo enabled, and then profile it with perf using something like the following:
$ perf record -F99 --call-graph dwarf ./your-programThen, in the accelerant repository, run:
$ uv run accelerant_server.pyFinally, in a separate terminal, run:
$ curl 'http://127.0.0.1:5000/optimize?project=PATH_TO_PROJECT_ROOT&perfDataPath=ABSOLUTE_PATH_TO_PERF_DATA'Alternatively, you can ask to optimize a specific line without perf information using the following:
$ curl 'http://127.0.0.1:5000/optimize?project=PATH_TO_PROJECT_ROOT&filename=RELATIVE_PATH_TO_FILE_IN_PROJECT&line=LINE_NUMBER_IN_FILE'