libsysprof-capture: add writer buffer size helper

This could be useful to know what you can actually shove into the capture
file based on size.
This commit is contained in:
Christian Hergert
2019-05-24 18:19:57 -07:00
parent 9c1518b384
commit 19f4a6ae70
3 changed files with 11 additions and 0 deletions

View File

@ -1296,3 +1296,11 @@ sysprof_capture_writer_new_from_env (gsize buffer_size)
return sysprof_capture_writer_new_from_fd (dup (fd), buffer_size);
}
gsize
sysprof_capture_writer_get_buffer_size (SysprofCaptureWriter *self)
{
g_return_val_if_fail (self != NULL, 0);
return self->len;
}