Commit graph

29 commits

Author SHA1 Message Date
Arun Raghavan
ab5fadec2b pw-profiler: Move clients' legend away from graph data
With a large number of clients, some of them might be obscured by the
graph. Separate out the legend for now. We might be able to do better
formatting, but for now, this should do.
2024-07-17 15:54:34 +00:00
Arun Raghavan
585106df04 pw-profiler: Add more explanatory text to profile graphs
Should help make it easier to parse what each field means.
2024-07-17 15:54:34 +00:00
Wim Taymans
3de4f0d48b pw-profiler: add -n and -J options
The -n option sets the number of iterations to log.

The -J option dumps the raw profiler data as JSON on stdout.
2024-07-15 12:23:58 +02:00
Wim Taymans
1ae4374ccf Fix compilation with -Werror=float-conversion
Better make the conversions explicit so that we don't get any surprises.

Fixes #4065
2024-06-18 12:17:56 +02:00
Wim Taymans
27dbbd40c9 tools: improve indentation 2024-02-09 10:24:34 +01:00
Wim Taymans
2ed65a7e36 profiler: improve profiler stats
The driver and follower signal times are currently the same timestamp
so allow a 0 difference between the driver and follower signal time
to calculate the scheduling delay.
2023-05-06 10:54:57 +02:00
Barnabás Pőcze
934ab3036e treewide: use SPDX tags to specify copyright information
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.

See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Wim Taymans
f472fd736d fix includes
Only include debug we need. We usually only need the debug types.
2023-01-18 13:12:16 +01:00
Demi Marie Obenour
bb4f274ae0 Make all fopen() calls use O_CLOEXEC
by adding "e" to the mode strings.
2022-09-23 15:19:01 +00:00
Pauli Virtanen
c66bb65c7a pipewire: don't setlocale from pw_init, let parent app set it
Library code generally shouldn't modify global state, so pw_init()
should not result to changing the C locale.

Instead, set the C locale in main() for tools and daemons.

We'll still setlocale for LC_MESSAGES, to get translated UI elements in
wireplumber. This workaround should be removed eventually...
2022-03-22 21:32:35 +02:00
Wim Taymans
e82f775fb3 tools: remove listeners 2022-02-09 16:30:13 +01:00
Wim Taymans
afc88a12e5 tools: cleanup up printf
Make all tools output to stdout (pw-mon mostly) so that we can pipe the
output around.
Send errors to stderr.
fprintf(stdout, ...)  -> printf(...)
setlinebuf for stdout so that pipe works better.

See #2110
2022-02-07 17:03:46 +01:00
George Kiagiadakis
59407d2f08 includes: update all references to extensions to point to pipewire/extensions
This also brings the advantage that all tools, examples, modules, components
can also be compiled standalone out-of-tree using libpipewire from the system
2021-06-18 17:54:18 +03:00
Peter Hutterer
522f87d5ea treewide: replace strcmp() != 0 with !spa_streq
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Peter Hutterer
7697ed0757 treewide: replace strcmp() == 0 with spa_streq()
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Wim Taymans
c85a04fb49 tools: add some check when parsing the profile info
Fail when we can't parse the profile info to avoid using invalid
values.
2021-03-27 20:37:26 +01:00
Wim Taymans
b3aa346063 handle core error better
Use the PW_ID_CORE constant
Quit the mainloop when server disconnected in the tools

See #395
2020-11-20 12:29:51 +01:00
Wim Taymans
f08c35259c avoid uninitialized variables 2020-06-23 15:25:27 +02:00
Wim Taymans
fa04d2ee1b profiler: fix some leaks 2020-06-04 12:37:56 +02:00
Wim Taymans
7927a66fdd tools: improve error reporting 2020-04-04 20:23:42 +02:00
Wim Taymans
b87c0a9270 clean up options
make sure we can use -v for verbose mode
2020-04-02 14:34:02 +02:00
Wim Taymans
7693834a81 pw-profiler: report error when we can't bind 2020-03-26 10:24:14 +01:00
Wim Taymans
646088b90c tools: add getopt argument parsing
Add some help, version, remote options for tools
Add option for output filename in pw-profiler
Add option to start pw-cli as daemon or not, make it connect to the
default PipeWire instance by default (instead of local instance)
2020-03-24 16:36:48 +01:00
Wim Taymans
64391f1ed5 profiler: avoid negative times 2020-02-03 13:14:56 +01:00
Wim Taymans
a4a93a2a16 profiler: Improve profiler info
Split the profiler info into multiple properties.
Give feedback about time and logged samples while profiling.
2020-02-03 12:33:01 +01:00
Wim Taymans
6f31a16024 pw-profiler: add some more driver measurements
Add estimated period
Add reported driver delay
2020-01-31 17:56:00 +01:00
Wim Taymans
8b303361d8 pw-profiler: avoid copying invalid values 2020-01-31 16:31:35 +01:00
Wim Taymans
afdb6586b5 pw-profiler: various improvements
Small cleanups.
Print some useful status info.
Fail when there is no Profiler API found.
Only log data from the first driver we find.
2020-01-31 16:03:05 +01:00
Wim Taymans
3317af804b pw-profiler: add profiler tool
Add Profiler object and fields.
Add profiler extension API. It notifies Profiler objects with
real-time performance data.
Add module that implements the profiler extension.
Add pw-profiler tool that binds to the profiler API and dumps the
data into a log file, gnuplot files, a html page and a script to
generate svg graphs. This is almost the same as what JACK2
JackEngineProfiling does.
2020-01-31 15:13:47 +01:00