document profiling bodied api requests

pull/10330/head
ulferts 3 years ago committed by Oliver Günther
parent c694b20782
commit 2f19457291
  1. 18
      docs/development/profiling/README.md
  2. BIN
      docs/development/profiling/flamegraph_retrieval.png

@ -60,3 +60,21 @@ Having a flamegraph displayed is triggered by issuing the request with `pp=flame
will show the flamegraph for that api request.
The options available can be displayed by adding `pp=help` to a query.
### API patch/post requests
For bodied requests (e.g. patch/post) which typically are triggered not from a browser when profiling, a flamegraph can still be created, e.g.:
`PATCH http://localhost:3000/api/v3/work_packages/1547?pp=async-flamegraph`
will result in a flamegraph being created. Instead of appending `pp=flamegraph`, the appended parameter needs to be `pp=async-flamegraph`.
But that flamegraph will not show up directly in the tools typically used.
The flamegraph needs to be accessed by calling an arbitrary page of the application via the browser after having issued the bodied request (e.g. `http://localhost:3000`). In the lower right corner, sometimes after some waiting, the profiling tools will show a small menu from which the generated flamegraph can be accessed.
![Flamegraph retrieval](flamegraph_retrieval.png)
In case this fails, the flamegraphs are stored in `tmp/miniprofiler` in a file called `mp_timers_[some hash]`. Knowing which file belongs to the previously created flamegraph, the file can be opened by requesting:
`http://localhost:3000/mini-profiler-resources/flamegraph?id=[some hash]`

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Loading…
Cancel
Save