Skip to content

Commit c7dfec6

Browse files
committed
chore(docs): update README file
1 parent 129a851 commit c7dfec6

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,42 @@ You may be looking for:
1616
- [Examples](examples)
1717
- [Release notes](https://github.com/omarabid/pyroscope/releases)
1818

19+
## Table of Contents
20+
- [Quick Start](#quick-start)
21+
- [Limitations](#limitations)
22+
- [pyroscope-cli](#pyroscope-cli)
23+
- [Getting Help](#getting-help)
24+
- [License](#license)
25+
1926
### Quick Start
2027

2128
Add this to your `Cargo.toml`:
2229

2330
```toml
2431
[dependencies]
2532
pyroscope = "0.4.0"
33+
pyroscope-pprofrs = "0.1"
2634
```
2735

28-
Configure your profiler:
36+
Configure and create the backend (pprof-rs)
37+
38+
```rust
39+
let pprof_config = PprofConfig::new().sample_rate(100);
40+
let pprof_backend = Pprof::new(pprof_config);
41+
```
42+
43+
Configure the Pyroscope agent:
2944

3045
```rust
3146
let mut agent =
3247
PyroscopeAgent::builder("http://localhost:4040", "myapp-profile")
33-
.sample_rate(100)
48+
.backend(pprof_backend)
3449
.build()?;
3550
```
3651

3752
Profile your code:
3853

3954
```rust
40-
4155
agent.start();
4256
// Profiled computation
4357
agent.stop();
@@ -52,6 +66,8 @@ Profile your code:
5266
- **Timer**: epoll (for Linux) and kqueue (for macOS) are required for a more precise timer.
5367
- **Shutdown**: The Pyroscope Agent might take some time (usually less than 10 seconds) to shutdown properly and drop its threads.
5468

69+
### Pyroscope CLI
70+
5571
### Getting help
5672

5773
You can read the [Docs](https://docs.rs/pyroscope/) or check the [examples](examples) for detailed usage of the library. You can also join the [Slack channel](https://pyroscope.slack.com/archives/C02Q47F8LJH) if you have questions.

0 commit comments

Comments
 (0)