https://github.com/cuviper/probe-rs
probe: Static probes for Rust
https://github.com/cuviper/probe-rs
rust
Last synced: about 1 year ago
JSON representation
probe: Static probes for Rust
- Host: GitHub
- URL: https://github.com/cuviper/probe-rs
- Owner: cuviper
- License: apache-2.0
- Created: 2014-07-08T22:21:20.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-04-11T15:58:17.000Z (about 3 years ago)
- Last Synced: 2025-03-30T14:11:12.198Z (over 1 year ago)
- Topics: rust
- Language: Rust
- Homepage:
- Size: 928 KB
- Stars: 94
- Watchers: 10
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# probe: Static probes for Rust
[](https://crates.io/crates/probe)

[](https://docs.rs/probe)
[](https://github.com/cuviper/probe-rs/actions)
With the `probe!` macro, programmers can place static instrumentation
points in their code to mark events of interest. These are compiled into
platform-specific implementations, e.g. SystemTap SDT on Linux. Probes are
designed to have negligible overhead during normal operation, so they can
be present in all builds, and only activated using those external tools.
[Documentation](https://docs.rs/probe/)
## Using probe
[`probe!` is available on crates.io](https://crates.io/crates/probe).
The recommended way to use it is to add a line into your Cargo.toml such as:
```toml
[dependencies]
probe = "0.5"
```
Then `use probe::probe;` in your code and insert macro calls wherever you want
to mark something, `probe!(provider, name, args...)`. The `provider` and `name`
are identifiers of your choice, and any additional arguments are runtime
expressions that will be cast `as isize` for the probe consumer to read.
There is also a `probe_lazy!` variant that tries to avoid evaluating the
argument expressions when probes aren't in use, if the platform-specific
implementation allows that to be determined.
## License
`probe` is distributed under the terms of both the MIT license and the
Apache License (Version 2.0). See [LICENSE-APACHE](LICENSE-APACHE) and
[LICENSE-MIT](LICENSE-MIT) for details. Opening a pull request is
assumed to signal agreement with these licensing terms.