mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-profile: add hostname to capture metadata
This commit is contained in:
@ -154,6 +154,7 @@ sysprof_recording_fiber (gpointer user_data)
|
||||
struct sysinfo si;
|
||||
gint64 begin_time;
|
||||
gint64 end_time;
|
||||
char hostname[64] = {0};
|
||||
|
||||
g_assert (SYSPROF_IS_RECORDING (self));
|
||||
|
||||
@ -198,6 +199,9 @@ sysprof_recording_fiber (gpointer user_data)
|
||||
add_metadata (self, "uname.machine", uts.machine);
|
||||
}
|
||||
|
||||
if (gethostname (hostname, sizeof hostname-1) == 0)
|
||||
add_metadata (self, "hostname", hostname);
|
||||
|
||||
/* More system information via sysinfo */
|
||||
if (sysinfo (&si) == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user