libsysprof-gtk: reduce overhead of test charts

This commit is contained in:
Christian Hergert
2023-06-20 19:20:03 -07:00
parent c3e95f5243
commit 40778febae

View File

@ -130,6 +130,8 @@ main (int argc,
if (!(document = sysprof_document_loader_load (loader, NULL, &error)))
g_error ("Failed to load document: %s", error->message);
g_print ("loaded\n");
session = sysprof_session_new (document);
time_span = sysprof_document_get_time_span (document);
@ -151,6 +153,8 @@ main (int argc,
for (guint i = 0; i < 100; i++)
sysprof_xy_series_add (num_series, i, g_random_int_range (0, 100), 0);
g_print ("series built\n");
window = g_object_new (GTK_TYPE_WINDOW,
"default-width", 800,
"default-height", 600,
@ -188,12 +192,12 @@ main (int argc,
NULL);
split = g_object_new (SYSPROF_TYPE_SPLIT_LAYER,
"top", g_object_new (SYSPROF_TYPE_LINE_LAYER,
"series", samples_series,
"series", num_series,
"title", "Stack Depth as Line",
"fill", TRUE,
NULL),
"bottom", g_object_new (SYSPROF_TYPE_LINE_LAYER,
"series", samples_series,
"series", num_series,
"title", "Stack Depth as Line",
"flip-y", TRUE,
NULL),