-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add eflambe to dev dependencies (#373)
- Loading branch information
Showing
5 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,4 @@ burrito_out/* | |
supavisor-*.tar.gz | ||
|
||
priv/native/* | ||
*.bggg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Profiling of the Supabase can be done using [eFlambé][eflambe] project. | ||
|
||
Example profiling session looks like: | ||
|
||
- Start application within IEx session (for example by using `make dev`) | ||
- Within given session you can specify which function you want to trace, by | ||
calling `:eflambe.capture({mod, func, arity}, no_of_caputres)`, however it is | ||
useful to have some separate directory to store all traces, for that one can use | ||
quick snippet | ||
|
||
```elixir | ||
dir = "./tmp/capture-#{DateTime.utc_now()}"; File.mkdir_p!(dir); :eflambe.capture({Supavisor.ClientHandler, :handle_event, 4}, 0, [output_directory: dir]) | ||
``` | ||
|
||
Which provides separate directory for each tracing session. | ||
- Generated traces can be viewed in [Speedoscope][] for visual navigation. | ||
|
||
![Speedoscope session example](/docs/images/trace-example.png) | ||
|
||
### Problems to be resolved | ||
|
||
- Currently you can monitor only function calls. Sometimes it would be handy to | ||
monitor whole process instead, so it would provide better view into process work. | ||
[Stratus3D/eflambe#47](https://github.com/Stratus3D/eflambe/issues/47) | ||
- Currently if there is less than `no_of_captures` calls, then eFlambé will try | ||
to wait for more calls indefinitely. There is no way to listen only for some | ||
period and then just stop. [Stratus3D/eflambe#48](https://github.com/Stratus3D/eflambe/issues/48) | ||
- You will not see arguments of called functions in traces, which mean that you | ||
want to trace long running processes that have a lot of calls to similarly | ||
named function (like `gen_statem` process) you will need some manual work to | ||
find which clause matched given trace. [Stratus3D/eflambe#46](https://github.com/Stratus3D/eflambe/issues/46) | ||
|
||
[eflambe]: https://github.com/Stratus3D/eflambe | ||
[Speedoscope]: https://www.speedscope.app/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters