Skip to content

Commit 27f0c88

Browse files
committed
Bump version to 0.3.0
1 parent 5f41d30 commit 27f0c88

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ You can follow these examples on your own - just call `rebar3 as test shell` in
5656

5757
The first thing to do is to start the tracer with `tr:start/0`.
5858

59-
There is also `tr:start/1`, which accepts a [map of options](https://hexdocs.pm/erlang_doctor/0.2.9/tr.html#t:init_options/0), including:
59+
There is also `tr:start/1`, which accepts a [map of options](https://hexdocs.pm/erlang_doctor/0.3.0/tr.html#t:init_options/0), including:
6060

6161
- `tab`: collected traces are stored in an ETS table with this name (default: `trace`),
6262
- `limit`: maximum number of traces in the table - when it is reached, tracing is stopped (default: no limit).
@@ -93,7 +93,7 @@ If you want to trace selected processes instead of all of them, you can use `tr:
9393
tr:trace([Module1, Module2], [Pid1, Pid2]).
9494
```
9595

96-
The `tr:trace/1` function accepts a [map of options](https://hexdocs.pm/erlang_doctor/0.2.9/tr.html#t:trace_options/0), which include:
96+
The `tr:trace/1` function accepts a [map of options](https://hexdocs.pm/erlang_doctor/0.3.0/tr.html#t:trace_options/0), which include:
9797

9898
- `modules`: a list of module names or `{Module, Function, Arity}` tuples. The list is empty by default.
9999
- `pids`: a list of Pids of processes to trace, or the atom `all` (default) to trace all processes.
@@ -130,7 +130,7 @@ tr:trace(Modules), timer:sleep(1000), tr:stop_tracing().
130130
## Debugging: data analysis
131131

132132
The collected traces are stored in an ETS table (default name: `trace`).
133-
They are stored as [`tr`](https://hexdocs.pm/erlang_doctor/0.2.9/tr.html#t:tr/0) records with the following fields:
133+
They are stored as [`tr`](https://hexdocs.pm/erlang_doctor/0.3.0/tr.html#t:tr/0) records with the following fields:
134134

135135
- `index`: trace identifier, auto-incremented for each received trace.
136136
- `pid`: process identifier associated with the trace.
@@ -186,7 +186,7 @@ Use `tr:select/0` to select all collected traces.
186186
```
187187

188188
The `tr:select/1` function accepts a fun that is passed to `ets:fun2ms/1`.
189-
This way you can limit the selection to specific items and select only some fields from the [`tr`](https://hexdocs.pm/erlang_doctor/0.2.9/tr.html#t:tr/0) record:
189+
This way you can limit the selection to specific items and select only some fields from the [`tr`](https://hexdocs.pm/erlang_doctor/0.3.0/tr.html#t:tr/0) record:
190190

191191
```erlang
192192
7> tr:select(fun(#tr{event = call, data = [N]}) -> N end).
@@ -342,15 +342,15 @@ The third possibility is `output => longest` which does the opposite of pruning,
342342
ts = 1705475521743239,info = no_info}]]
343343
```
344344

345-
Possible [options](https://hexdocs.pm/erlang_doctor/0.2.9/tr.html#t:tb_options/0) for `tr:tracebacks/2` include:
345+
Possible [options](https://hexdocs.pm/erlang_doctor/0.3.0/tr.html#t:tb_options/0) for `tr:tracebacks/2` include:
346346

347347
- `tab` is the table or list which is like the second argument of `tr:filter/2`,
348348
- `output` - `shortest` (default), `all`, `longest` - see above.
349349
- `format` - `list` (default), `tree` - returns a list of (possibly merged) call trees instead of tracebacks, `root` - returns a list of root calls. Trees and roots don't distinguish between `all` and `longest` output formats. Using `root` is equivalent to using `tree`, and then calling `tr:roots/1` on the results. There is also `tr:root/1` for a single tree.
350350
- `order` - `top_down` (default), `bottom_up` - call order in each tracaback; only for the `list` format.
351351
- `limit` - positive integer or `infinity` (default) - limits the number of matched traces. The actual number of tracebacks returned can be smaller unless `output => all`
352352

353-
There are also functions `tr:traceback/1` and `tr:traceback/2`. They set `limit` to one and return only one trace if it exists. The options for `tr:traceback/2` are the same as for `tr:traceback/2` except `limit` and `format` (which are not supported). Additionally, it is possible to pass a [`tr`](https://hexdocs.pm/erlang_doctor/0.2.9/tr.html#t:tr/0) record (or an index) as the first argument to `tr:traceback/1` or `tr:traceback/2` to obtain the traceback for the provided trace event.
353+
There are also functions `tr:traceback/1` and `tr:traceback/2`. They set `limit` to one and return only one trace if it exists. The options for `tr:traceback/2` are the same as for `tr:traceback/2` except `limit` and `format` (which are not supported). Additionally, it is possible to pass a [`tr`](https://hexdocs.pm/erlang_doctor/0.3.0/tr.html#t:tr/0) record (or an index) as the first argument to `tr:traceback/1` or `tr:traceback/2` to obtain the traceback for the provided trace event.
354354

355355
### Trace ranges for filtered traces: `ranges`
356356

@@ -374,7 +374,7 @@ To get a list of traces between each matching call and the corresponding return,
374374
data = 1,ts = 1705475521750453,info = no_info}]]
375375
```
376376

377-
There is also `tr:ranges/2` - it accepts a [map of options](https://hexdocs.pm/erlang_doctor/0.2.9/tr.html#t:range_options/0), including:
377+
There is also `tr:ranges/2` - it accepts a [map of options](https://hexdocs.pm/erlang_doctor/0.3.0/tr.html#t:range_options/0), including:
378378

379379
- `tab` is the table or list which is like the second argument of `tr:filter/2`,
380380
- `max_depth` is the maximum depth of nested calls. A message event also adds 1 to the depth.
@@ -386,7 +386,7 @@ There is also `tr:ranges/2` - it accepts a [map of options](https://hexdocs.pm/e
386386
When you combine the options into `#{output => incomplete, max_depth => 1}`,
387387
you get all the calls which didn't return (they were still executing when tracing was stopped).
388388

389-
There are two additional functions: `tr:range/1` and `tr:range/2`, which return only one range if it exists. It is possible to pass a [`tr`](https://hexdocs.pm/erlang_doctor/0.2.9/tr.html#t:tr/0) record or an index as the first argument to `tr:range/1` or `tr:range/2` as well.
389+
There are two additional functions: `tr:range/1` and `tr:range/2`, which return only one range if it exists. It is possible to pass a [`tr`](https://hexdocs.pm/erlang_doctor/0.3.0/tr.html#t:tr/0) record or an index as the first argument to `tr:range/1` or `tr:range/2` as well.
390390

391391
### Calling a function from a trace: `do`
392392

@@ -433,7 +433,7 @@ When there is no trace to return, `not_found` error is raised:
433433
```
434434

435435
There are also more advanced variants of these fucntions: `tr:next/2` and `tr:prev/2`.
436-
As their second argument, they take a [map of options](https://hexdocs.pm/erlang_doctor/0.2.9/tr.html#t:prev_next_options/0), including:
436+
As their second argument, they take a [map of options](https://hexdocs.pm/erlang_doctor/0.3.0/tr.html#t:prev_next_options/0), including:
437437

438438
- `tab` is the table or list (like the second argument of `tr:filter/2`),
439439
- `pred` is a predicate function that should return `true` for a matching trace record.
@@ -556,7 +556,7 @@ and `Count` is the number of times the tree repeated. The list is sorted by `Tim
556556
In the example above `fib(2)` was called twice and `fib(1)` was called 3 times,
557557
what already shows that the recursive implementation is suboptimal.
558558

559-
There is also `tr:top_call_trees/1`, which takes a [map of options](https://hexdocs.pm/erlang_doctor/0.2.9/tr.html#t:top_call_trees_options/0), including:
559+
There is also `tr:top_call_trees/1`, which takes a [map of options](https://hexdocs.pm/erlang_doctor/0.3.0/tr.html#t:top_call_trees_options/0), including:
560560
- `output` is `reduced` by default, but it can be set to `complete` where subtrees of already listed trees are also listed.
561561
- `min_count` is the minimum number of times a tree has to occur to be listed, the default is 2.
562562
- `min_time` is the minimum accumulated time for a tree, by default there is no minimum.

src/erlang_doctor.app.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{application, erlang_doctor,
22
[{description, "Lightweight tracing, debugging and profiling utility for Erlang"},
3-
{vsn, "0.2.9"},
3+
{vsn, "0.3.0"},
44
{registered, []},
55
{mod, { erlang_doctor_app, []}},
66
{applications,

0 commit comments

Comments
 (0)