summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2020-07-17 19:10:18 +0100
committerPhilip Withnall <withnall@endlessm.com>2020-07-27 15:44:00 +0100
commit1369a85a7bbde34dc1c0162ab82c7f5e1d175438 (patch)
tree0ec5d4ee6a73d93efbe7b8b2ee8bb6901dd34a94 /meson.build
parent38e28398c36f196353dea5faec5848526f62d520 (diff)
downloadlibsoup-1369a85a7bbde34dc1c0162ab82c7f5e1d175438.tar.gz
soup-message-io: Add sysprof profiling support for HTTP connections
This adds very basic support for dumping HTTP connection information to sysprof, if the process is being run under a sysprof session. See https://gitlab.gnome.org/GNOME/sysprof/-/issues/43 for plans of how this could be expanded in future. This is just a starting point. The code in this commit dumps a message to the sysprof capture which includes the URI, total time for the connection (request + response), and the amount of data transferred in the request and response. It adds an optional dependency on `libsysprof-capture-4.a`, and a subproject for building that if it’s not available on the system. Signed-off-by: Philip Withnall <withnall@endlessm.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build16
1 files changed, 16 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 62da6bf7..909c7fdf 100644
--- a/meson.build
+++ b/meson.build
@@ -151,6 +151,22 @@ if cc.has_function('gmtime_r', prefix : '#include <time.h>', args : default_sour
cdata.set('HAVE_GMTIME_R', '1')
endif
+# sysprof support
+libsysprof_capture_dep = dependency('sysprof-capture-4',
+ required: get_option('sysprof'),
+ default_options: [
+ 'enable_examples=false',
+ 'enable_gtk=false',
+ 'enable_tests=false',
+ 'enable_tools=false',
+ 'libsysprof=false',
+ 'with_sysprofd=none',
+ 'help=false',
+ ],
+ fallback: ['sysprof', 'libsysprof_capture_dep'],
+)
+cdata.set('HAVE_SYSPROF', libsysprof_capture_dep.found())
+
###################
# GIO TLS support #
###################