Polls sccache's counters every 10 s, keeps a JSON-lines history, and serves the page and its API on 127.0.0.1: one difference-with-reset mechanism behind every range, per-language time saved, problems, a copyable summary, and extra tables for multi-level and distributed caches. The page is embedded from crates/ui/dist when it exists, with a placeholder until then. POST /api/zero refuses foreign Host and Origin headers. Tests run against a stand-in sccache script; sample fixtures for the multi-level and distributed shapes are made up.
11 lines
250 B
Makefile
11 lines
250 B
Makefile
# Build the page first, then the server with the page inside it.
|
|
build:
|
|
cd crates/ui && trunk build --release
|
|
cargo build --release -p sccache-dash
|
|
|
|
test:
|
|
cargo test -p sccache-dash -p sccache-dash-api
|
|
|
|
run:
|
|
cargo run -p sccache-dash
|