mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
libsysprof: add capture time as metadata
This is actually readable to the user and doesn't require dealing with SysprofCaptureFileHeader data.
This commit is contained in:
@ -194,6 +194,13 @@ sysprof_recording_fiber (gpointer user_data)
|
|||||||
add_metadata (self, "org.gnome.sysprof.app-id", APP_ID_S);
|
add_metadata (self, "org.gnome.sysprof.app-id", APP_ID_S);
|
||||||
add_metadata (self, "org.gnome.sysprof.version", PACKAGE_VERSION);
|
add_metadata (self, "org.gnome.sysprof.version", PACKAGE_VERSION);
|
||||||
|
|
||||||
|
/* Give a readable timestamp to the user */
|
||||||
|
{
|
||||||
|
g_autoptr(GDateTime) now = g_date_time_new_now_local ();
|
||||||
|
g_autofree char *now_str = g_date_time_format_iso8601 (now);
|
||||||
|
add_metadata (self, "capture-time", now_str);
|
||||||
|
}
|
||||||
|
|
||||||
/* Include some host/kernel/arch information */
|
/* Include some host/kernel/arch information */
|
||||||
add_metadata_int (self, "n-cpu", g_get_num_processors ());
|
add_metadata_int (self, "n-cpu", g_get_num_processors ());
|
||||||
add_metadata_int (self, "page-size", sysprof_getpagesize ());
|
add_metadata_int (self, "page-size", sysprof_getpagesize ());
|
||||||
|
|||||||
Reference in New Issue
Block a user