Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRobert Adam <dev@robert-adam.de>2021-12-29 20:52:42 +0300
committerGitHub <noreply@github.com>2021-12-29 20:52:42 +0300
commitdb57b632416951ed4bab7cdcb9de69a9f649383e (patch)
treef614b2175968b36d46caea31602607e5d811c3f8 /docs
parentead095e3d0457f0236e3f7d6c638b8f717f91870 (diff)
parentdd56e174f2941e8b17e4672a335f326e07b825cc (diff)
Merge PR #5396: FEAT(server): Add support for the tracy profiler
Tracy (wolfpld/tracy) is a profiler that is aimed at having a very low impact on the runtime performance and is thus suitable to be used in production systems to figure out what is going on and how the code is performing. For the time being, this commit instruments only the server code. Furthermore, the instrumentation is performed in a rather minimalistic way that should suffice to start profiling audio and control message processing but is definitely far from being complete. Further instrumentation will be added on-demand.
Diffstat (limited to 'docs')
-rw-r--r--docs/dev/Profiling.md33
-rw-r--r--docs/dev/build-instructions/cmake_options.md5
2 files changed, 38 insertions, 0 deletions
diff --git a/docs/dev/Profiling.md b/docs/dev/Profiling.md
new file mode 100644
index 000000000..1688c7ca9
--- /dev/null
+++ b/docs/dev/Profiling.md
@@ -0,0 +1,33 @@
+# Profiling
+
+Mumble comes with built-in support for the [Tracy](https://github.com/wolfpld/tracy) profiler. In order to activate the baked-in instrumentation, use
+`-Dtracy=ON` when compiling Mumble. When using that option, you should see a line in the cmake output that says `TRACY_ENABLE: ON`.
+
+
+## Instrumented parts
+
+Currently only the Mumble server is instrumented (can be profiled using Tracy).
+
+
+## Instructions
+
+Once you have built Mumble with `-Dtracy=ON`, Mumble will act as a Tracy _client_ (in Tracy terms) which means that you can connect any Tracy _server_
+to it. Most commonly, you'll want to use either the `profiler` or the `capture`. Both of these programs live in the tracy submodule
+(`3rdparty/tracy/`) and can be built from there. For build instructions, see the
+[Tracy Manual](https://github.com/wolfpld/tracy/releases/latest/download/tracy.pdf).
+
+The `profiler` is an interactive GUI that can be attached to a currently running Mumble instance to see the profiling data (more or less) in realtime
+or you can open a previously recorded trace for analysis. Note that it is also possible to connect to a Mumble instance on a remote machine using this
+tool. All that is required is that it is able to establish a TCP connection to the target machine.
+
+The `capture` tool has to be run on the same machine as the Mumble instance that shall be profiled. It is a command-line tool that will attach to a
+running Tracy _client_ as soon as it is started. It will dump the captured data directly into a file, that can later on be opened in `profiler` for
+further analysis. This tool is recommended when you want to profile over a longer period of time or you don't want to add the burden of sending all
+profiling data out through the network, while Mumble is running.
+
+
+## Notes
+
+- Profiling should generally be done in `Release` mode in order to obtain reasonable data
+- If you are having issues connecting your Tracy _server_ to the Mumble server, you should not let it fork. The default behavior in release
+ mode is to fork, but you can change that by using the `-fg` parameter when starting the server.
diff --git a/docs/dev/build-instructions/cmake_options.md b/docs/dev/build-instructions/cmake_options.md
index 6207ae760..c7aa36a82 100644
--- a/docs/dev/build-instructions/cmake_options.md
+++ b/docs/dev/build-instructions/cmake_options.md
@@ -229,6 +229,11 @@ Build binaries in a way that allows easier debugging.
Build tests
(Default: OFF)
+### tracy
+
+Enable the tracy profiler.
+(Default: OFF)
+
### translations
Include languages other than English.