README.md in stackprof-0.2.7 vs README.md in stackprof-0.2.8

- old
+ new

@@ -184,11 +184,11 @@ 70346498325080 [size=10.0] [fontsize=10.0] [shape=box] [label="<main>\n0 (0.0%)\rof 188 (100.0%)\r"]; 70346498325080 -> 70346498324300 [label="188"]; } ``` -#### `StackProf::Report.new(data).print_source(/pow|newobj|math/)` +#### `StackProf::Report.new(data).print_method(/pow|newobj|math/)` ``` A#pow (/Users/tmm1/code/stackprof/sample.rb:11) | 11 | def pow 91 (48.4% / 100.0%) | 12 | 2 ** 100 @@ -263,13 +263,25 @@ the profiler can be started and stopped manually. results are accumulated until retrieval, across multiple start/stop invocations. ``` ruby StackProf.running? -StackProf.start +StackProf.start(mode: :cpu) StackProf.stop -StackProf.results +StackProf.results('/tmp/some.file') ``` + +### all options + +`StackProf.run` accepts an options hash. Currently, the following options are recognized: + +Option | Meaning +------- | --------- +`mode` | mode of sampling: `:cpu`, `:wall`, `:object`, or `:custom` [c.f.](#sampling) +`out` | the target file, which will be overwritten +`interval` | mode-relative sample rate [c.f.](#sampling) +`aggregate` | defaults: `true` - if `false` disables [aggregation](#aggregation) +`raw` | defaults `false` - if `true` collects the extra data required by the `--flamegraph` and `--stackcollapse` report types ### todo * file/iseq blacklist * restore signal handlers on stop