libsysprof-analyze: include time as fractions for marks

This allows more easily calculating the horizontal position of marks and
their duration from charts.
This commit is contained in:
Christian Hergert
2023-06-15 16:14:32 -07:00
parent 7568c31fcf
commit 6dcb5e5fdd
5 changed files with 73 additions and 22 deletions

View File

@ -33,15 +33,19 @@ typedef struct _SysprofDocumentMark SysprofDocumentMark;
typedef struct _SysprofDocumentMarkClass SysprofDocumentMarkClass;
SYSPROF_AVAILABLE_IN_ALL
GType sysprof_document_mark_get_type (void) G_GNUC_CONST;
GType sysprof_document_mark_get_type (void) G_GNUC_CONST;
SYSPROF_AVAILABLE_IN_ALL
gint64 sysprof_document_mark_get_duration (SysprofDocumentMark *self);
gint64 sysprof_document_mark_get_duration (SysprofDocumentMark *self);
SYSPROF_AVAILABLE_IN_ALL
const char *sysprof_document_mark_get_group (SysprofDocumentMark *self);
const char *sysprof_document_mark_get_group (SysprofDocumentMark *self);
SYSPROF_AVAILABLE_IN_ALL
const char *sysprof_document_mark_get_name (SysprofDocumentMark *self);
const char *sysprof_document_mark_get_name (SysprofDocumentMark *self);
SYSPROF_AVAILABLE_IN_ALL
const char *sysprof_document_mark_get_message (SysprofDocumentMark *self);
const char *sysprof_document_mark_get_message (SysprofDocumentMark *self);
SYSPROF_AVAILABLE_IN_ALL
void sysprof_document_mark_get_time_fraction (SysprofDocumentMark *self,
double *begin_fraction,
double *end_fraction);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofDocumentMark, g_object_unref)