#profiler #legion #legion-prof

bin+lib legion_prof_viewer

Profiler UI frontend component for Legion Prof

3 unstable releases

0.2.1 Mar 20, 2024
0.2.0 Mar 20, 2024
0.1.0 Mar 14, 2024

#65 in Profiling

Download history 145/week @ 2024-03-09 695/week @ 2024-03-16 436/week @ 2024-03-23 449/week @ 2024-03-30 380/week @ 2024-04-06

2,035 downloads per month
Used in legion_prof

Apache-2.0

730KB
4.5K SLoC

Legion Prof Viewer

This repository contains the Legion Prof frontend in Rust. The frontend here is intended to be used with Legion Prof and is not (typically) used standalone. Most users want the integrated version (i.e., that can parse Legion Prof logs and generate a visualization). To use the integrated version of Legion Prof, clone the Legion repository and run:

git clone https://github.com/StanfordLegion/legion.git
cargo install --locked --all-features --path legion/tools/legion_prof_rs

To start a native viewer right away, run:

legion_prof --view prof_*.gz

To start a server (and attach a viewer to it), run:

legion_prof --serve prof_*.gz
legion_prof --attach http://127.0.0.1:8080/

If you really want to run the frontend by itself, continue to the instructions below.

Quickstart

Native

Run:

cargo run --release

Ubuntu dependencies:

sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev

Fedora Rawhide dependencies:

dnf install clang clang-devel clang-tools-extra speech-dispatcher-devel libxkbcommon-devel pkg-config openssl-devel libxcb-devel fontconfig-devel

Web Locally

Install dependencies:

cargo install --locked trunk

Then run:

trunk serve

Go to http://127.0.0.1:8080/#dev in your browser. (The #dev skips client-side caching, so that you don't need to clear your browser cache as you develop the app.)

Web Deploy

Install trunk as above. Then run:

trunk build --release

This will generate a static site under dist that you can upload. Note that trunk by default assumes the site will live in the root of the domain (e.g., https://example.com/). If that is not true, add --public-url ... to the trunk command where ... is the path the build is hosted under (e.g., https://example.com/.../).

Web Auto-Deploy

This repository is configured via GitHub Actions to deploy automatically on each push to the master branch. You can test it at https://legion.stanford.edu/prof-viewer/?url=https://... where https://... is the URL of the profile to load.

Dependencies

~15–60MB
~1M SLoC