README.md in stackprof-0.2.2 vs README.md in stackprof-0.2.3
- old
+ new
@@ -8,14 +8,13 @@
### getting started
in ruby:
``` ruby
-profile = StackProf.run(mode: :cpu) do
+StackProf.run(mode: :cpu, out: 'tmp/stackprof-cpu-myapp.dump') do
...
end
-File.open('tmp/stackprof-cpu-myapp.dump', 'wb'){ |f| f.write Marshal.dump(profile) }
```
via rack:
``` ruby
@@ -61,15 +60,17 @@
| 20 | def present?
910 (1.5%) / 59 (0.1%) | 21 | !blank?
| 22 | end
```
+For an experimental version of WebUI reporting of stackprof, see [stackprof-webnav](https://github.com/alisnic/stackprof-webnav)
+
### sampling
four sampling modes are supported:
- - :wall (using `ITIMER_REAL` and `SIGALRM`) [default mode]
- - :cpu (using `ITIMER_PROF` and `SIGPROF`)
+ - :wall (using `ITIMER_REAL` and `SIGALRM`)
+ - :cpu (using `ITIMER_PROF` and `SIGPROF`) [default mode]
- :object (using `RUBY_INTERNAL_EVENT_NEWOBJ`)
- :custom (user-defined via `StackProf.sample`)
samplers have a tuneable interval which can be used to reduce overhead or increase granularity: