sysprof: filter sample graph by visible time range

This allows it to avoid a bunch of work when you've dived down into a
section of visible time, as fewer nodes need to be looked at.
This commit is contained in:
Christian Hergert
2023-07-13 11:06:06 -07:00
parent b9f7ecd945
commit 72cf6ff3a5
2 changed files with 18 additions and 7 deletions

View File

@ -24,6 +24,7 @@
#include "sysprof-samples-section.h"
#include "sysprof-traceables-utility.h"
#include "sysprof-time-filter-model.h"
#include "sysprof-time-scrubber.h"
struct _SysprofSamplesSection
@ -59,6 +60,7 @@ sysprof_samples_section_class_init (SysprofSamplesSectionClass *klass)
g_type_ensure (SYSPROF_TYPE_CHART);
g_type_ensure (SYSPROF_TYPE_XY_SERIES);
g_type_ensure (SYSPROF_TYPE_COLUMN_LAYER);
g_type_ensure (SYSPROF_TYPE_TIME_FILTER_MODEL);
g_type_ensure (SYSPROF_TYPE_TIME_SCRUBBER);
g_type_ensure (SYSPROF_TYPE_TRACEABLES_UTILITY);
g_type_ensure (SYSPROF_TYPE_VALUE_AXIS);

View File

@ -29,13 +29,22 @@
</property>
<property name="series">
<object class="SysprofXYSeries">
<binding name="model">
<lookup name="samples" type="SysprofDocument">
<lookup name="document" type="SysprofSession">
<lookup name="session">SysprofSamplesSection</lookup>
</lookup>
</lookup>
</binding>
<property name="model">
<object class="SysprofTimeFilterModel">
<binding name="time-span">
<lookup name="visible-time" type="SysprofSession">
<lookup name="session">SysprofSamplesSection</lookup>
</lookup>
</binding>
<binding name="model">
<lookup name="samples" type="SysprofDocument">
<lookup name="document" type="SysprofSession">
<lookup name="session">SysprofSamplesSection</lookup>
</lookup>
</lookup>
</binding>
</object>
</property>
<property name="x-expression">
<lookup name="time" type="SysprofDocumentFrame"/>
</property>