Skip to content

Commit a2b56e9

Browse files
committed
Add release notes for the fiber profiler.
1 parent 18c33e8 commit a2b56e9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

releases.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Releases
22

3+
## Unreleased
4+
5+
### Fiber Stall Profiler
6+
7+
After several iterations of experimentation, we are officially introducing the fiber stall profiler, implemented using the optional `fiber-profiler` gem. This gem is not included by default, but can be added to your project:
8+
9+
```bash
10+
$ bundle add fiber-profiler
11+
```
12+
13+
After adding the gem, you can enable the fiber stall profiler by setting the `FIBER_PROFILER_CAPTURE=true` environment variable:
14+
15+
```bash
16+
$ FIBER_PROFILER_CAPTURE=true bundle exec ruby -rasync -e 'Async{Fiber.blocking{sleep 0.1}}'
17+
Fiber stalled for 0.105 seconds
18+
-e:1 in c-call '#<Class:Fiber>#blocking' (0.105s)
19+
-e:1 in c-call 'Kernel#sleep' (0.105s)
20+
Skipped 1 calls that were too short to be meaningful.
21+
```
22+
23+
The fiber profiler will help you find problems with your code that cause the event loop to stall, which can be a common source of performance issues in asynchronous code.
24+
325
## v2.21.1
426

527
### Worker Pool

0 commit comments

Comments
 (0)