Crate sightglass_api

Source
Expand description

This crate provides simple bindings for Rust to the Sightglass API. The primary intent is to make it easy to instrument Rust code that will be compiled to Wasm and measured with Sightglass.

For example:

use sightglass_api as bench;
bench::start();
let work = 42 * 42;
bench::end();

See [benchmarks-next/README.md] for more details.

Functionsยง

end
Call this once to start sightglass recording. When compiled to Wasm, the import will look like (import "bench" "start" (...)).
start
Call this once to end sightglass recording. When compiled to Wasm, the import will look like (import "bench" "end" (...)).