Skip to content

Commit 558343f

Browse files
authored
Merge pull request #153 from siedentop/patch-1
Rust: Document `scope` in favor of `begin`/`end`.
2 parents 96b4532 + 86fc9b1 commit 558343f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

rust/README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,12 @@ If you'd like to profile the latency of an operation you can instead use:
4343
```rust
4444
// Boy I wish this function executed more quickly...
4545
fn foo() {
46-
coz::begin!("foo");
47-
48-
// ...
49-
50-
coz::end!("foo");
46+
coz::scope!("foo");
5147
}
5248
```
5349

50+
Instead of `scope!` you may also use `coz::begin!("foo"); ... coz::end!("foo");`.
51+
5452
After you've instrumented your code, you need to also ensure that you're
5553
compiling with DWARF debug information. To do this you'll want to configure
5654
`Cargo.toml` again:

0 commit comments

Comments
 (0)