libsysprof-capture: add flush_delay for auto flushing

This can be useful in scenarios where you need to kill the application
using a signal so that data is not lost in the buffer.
This commit is contained in:
Christian Hergert
2019-06-05 15:12:17 -07:00
parent 0f85e10368
commit 97ec24ab42
2 changed files with 45 additions and 0 deletions

View File

@ -81,6 +81,10 @@ SYSPROF_AVAILABLE_IN_ALL
void sysprof_capture_writer_stat (SysprofCaptureWriter *self,
SysprofCaptureStat *stat);
SYSPROF_AVAILABLE_IN_ALL
void sysprof_capture_writer_set_flush_delay (SysprofCaptureWriter *self,
GMainContext *main_context,
guint timeout_seconds);
SYSPROF_AVAILABLE_IN_ALL
gboolean sysprof_capture_writer_add_file (SysprofCaptureWriter *self,
gint64 time,
gint cpu,