Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 149 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,33 @@ note that measuring using CPU cycles alone can be problematic (e.g., CPU
frequency changes, context switches, etc.).

Several _measures_ can be configured using the `--measure` option:
- `cycles`: the number of CPU cycles elapsed
- `perf-counters`: a selection of common `perf` counters (CPU cycles,
instructions retired, cache accesses, cache misses); only available on Linux
- `vtune`: record each phase as a VTune task for analysis; see [this help
documentation](docs/vtune.md) for more details
- `noop`: no measurement is performed

- `cycles`: The number of CPU cycles elapsed.

- `perf-counters`: A selection of common `perf` counters (CPU cycles,
instructions retired, cache accesses, cache misses); only available on Linux.

- `callgrind`: Uses Valgrind's Callgrind to count instructions retired and
simulate caches and branch prediction. Mostly deterministic and very low
noise. Only available on Linux and when built with `--features callgrind`.

- `vtune`: Record each phase as a VTune task for analysis; see [this help
documentation](docs/vtune.md) for more details.

- `noop`: No measurement is performed.

For example, run:

```
$ cargo run -- benchmark --measure perf-counters ...
```

For `callgrind`, Sightglass runs benchmark children under `setarch -R valgrind`
with a fixed cache model and forces single-threaded Wasmtime compilation with
`RAYON_NUM_THREADS=1` so results stay stable across machines. Use the same
Valgrind version when comparing data recorded on different machines for best
results.

### Getting Raw JSON or CSV Results

If you don't want the results to be summarized and displayed in a human-readable
Expand Down
6 changes: 5 additions & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ version = "0.1.0"
authors = ["Sightglass Project Developers"]
edition = "2021"

[features]
default = ["callgrind"]
callgrind = ["sightglass-recorder/callgrind"]

[dependencies]
anyhow = "1.0"
libloading = "0.9"
Expand All @@ -24,10 +28,10 @@ csv = "1.1.6"
regex = "1.5.4"
vega_lite_4 = { git = "https://github.com/procyon-rs/vega_lite_4.rs" }
minijinja = "2.10"
tempfile = "3.2.0"

[dev-dependencies]
assert_cmd = "1.0.4"
env_logger = "0.8.3"
predicates = "1.0.8"
tempfile = "3.2.0"
scraper = "0.24"
Loading
Loading