<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="SysprofMarksSection" parent="SysprofSection">
    <property name="title" translatable="yes">Marks</property>
    <binding name="indicator">
      <closure type="gchararray" function="format_number">
        <lookup name="n-items" type="SysprofDocumentBitsetIndex">
          <lookup name="marks" type="SysprofDocument">
            <lookup name="document" type="SysprofSession">
              <lookup name="session">SysprofMarksSection</lookup>
            </lookup>
          </lookup>
        </lookup>
      </closure>
    </binding>
    <child>
      <object class="GtkBox">
        <property name="orientation">vertical</property>
        <child>
          <object class="SysprofTimeScrubber" id="scrubber">
            <binding name="session">
              <lookup name="session">SysprofMarksSection</lookup>
            </binding>
            <child type="chart">
              <object class="SysprofChart">
                <property name="margin-top">6</property>
                <property name="margin-bottom">6</property>
                <property name="height-request">20</property>
                <child>
                  <object class="SysprofTimeSpanLayer">
                    <binding name="axis">
                      <lookup name="visible-time-axis" type="SysprofSession">
                        <lookup name="session">SysprofMarksSection</lookup>
                      </lookup>
                    </binding>
                    <property name="series">
                      <object class="SysprofTimeSeries">
                        <property name="model">
                          <object class="SysprofSampledModel">
                            <property name="max-items">1000</property>
                            <property name="model">
                              <object class="SysprofTimeFilterModel">
                                <binding name="time-span">
                                  <lookup name="visible-time" type="SysprofSession">
                                    <lookup name="session">SysprofMarksSection</lookup>
                                  </lookup>
                                </binding>
                                <binding name="model">
                                  <lookup name="marks" type="SysprofDocument">
                                    <lookup name="document" type="SysprofSession">
                                      <lookup name="session">SysprofMarksSection</lookup>
                                    </lookup>
                                  </lookup>
                                </binding>
                              </object>
                            </property>
                          </object>
                        </property>
                        <property name="begin-time-expression">
                          <lookup name="time" type="SysprofDocumentFrame"/>
                        </property>
                        <property name="end-time-expression">
                          <lookup name="end-time" type="SysprofDocumentMark"/>
                        </property>
                      </object>
                    </property>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="AdwViewStack" id="stack">
            <property name="vexpand">true</property>
            <child>
              <object class="AdwViewStackPage">
                <property name="title" translatable="yes">Mark Chart</property>
                <property name="icon-name">mark-chart-symbolic</property>
                <property name="child">
                  <object class="SysprofMarkChart" id="mark_chart">
                    <property name="max-items">5000</property>
                    <binding name="session">
                      <lookup name="session">SysprofMarksSection</lookup>
                    </binding>
                  </object>
                </property>
              </object>
            </child>
            <child>
              <object class="AdwViewStackPage">
                <property name="title" translatable="yes">Mark Table</property>
                <property name="icon-name">mark-table-symbolic</property>
                <property name="child">
                  <object class="SysprofMarkTable" id="mark_table">
                    <binding name="session">
                      <lookup name="session">SysprofMarksSection</lookup>
                    </binding>
                  </object>
                </property>
              </object>
            </child>
            <child>
              <object class="AdwViewStackPage">
                <property name="title" translatable="yes">Mark Waterfall</property>
                <property name="icon-name">mark-waterfall-symbolic</property>
                <property name="child">
                  <object class="GtkScrolledWindow">
                    <child>
                      <object class="GtkListView">
                        <property name="model">
                          <object class="GtkNoSelection">
                            <property name="model">
                              <object class="SysprofSessionModel">
                                <binding name="session">
                                  <lookup name="session">SysprofMarksSection</lookup>
                                </binding>
                                <property name="model">
                                  <object class="SysprofTimeFilterModel">
                                    <binding name="time-span">
                                      <lookup name="selected-time" type="SysprofSession">
                                        <lookup name="session">SysprofMarksSection</lookup>
                                      </lookup>
                                    </binding>
                                    <binding name="model">
                                      <lookup name="marks" type="SysprofDocument">
                                        <lookup name="document" type="SysprofSession">
                                          <lookup name="session">SysprofMarksSection</lookup>
                                        </lookup>
                                      </lookup>
                                    </binding>
                                  </object>
                                </property>
                              </object>
                            </property>
                          </object>
                        </property>
                        <property name="factory">
                          <object class="GtkBuilderListItemFactory">
                            <property name="bytes"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="GtkListItem">
    <property name="child">
      <object class="SysprofChart">
        <property name="height-request">16</property>
        <binding name="tooltip-text">
          <lookup name="tooltip" type="SysprofDocumentMark">
            <lookup name="item" type="SysprofSessionModelItem">
              <lookup name="item">GtkListItem</lookup>
            </lookup>
          </lookup>
        </binding>
        <child>
          <object class="SysprofTimeSpanLayer">
            <binding name="axis">
              <lookup name="selected-time-axis" type="SysprofSession">
                <lookup name="session" type="SysprofSessionModelItem">
                  <lookup name="item">GtkListItem</lookup>
                </lookup>
              </lookup>
            </binding>
            <property name="series">
              <object class="SysprofTimeSeries">
                <property name="model">
                  <object class="SysprofSampledModel">
                    <property name="max-items">2000</property>
                    <property name="model">
                      <object class="SysprofSingleModel">
                        <binding name="item">
                          <lookup name="item">GtkListItem</lookup>
                        </binding>
                      </object>
                    </property>
                  </object>
                </property>
                <property name="label-expression">
                  <closure type="gchararray" function="format_mark_label">
                    <lookup name="item" type="SysprofSessionModelItem"/>
                  </closure>
                </property>
                <property name="begin-time-expression">
                  <lookup name="time" type="SysprofDocumentMark">
                    <lookup name="item" type="SysprofSessionModelItem"/>
                  </lookup>
                </property>
                <property name="end-time-expression">
                  <lookup name="end-time" type="SysprofDocumentMark">
                    <lookup name="item" type="SysprofSessionModelItem"/>
                  </lookup>
                </property>
              </object>
            </property>
          </object>
        </child>
      </object>
    </property>
  </template>
</interface>
]]>
                            </property>
                          </object>
                        </property>
                      </object>
                    </child>
                  </object>
                </property>
              </object>
            </child>
            <child>
              <object class="AdwViewStackPage">
                <property name="title" translatable="yes">Summary</property>
                <property name="icon-name">summary-symbolic</property>
                <property name="child">
                  <object class="GtkScrolledWindow">
                    <child>
                      <object class="GtkColumnView" id="summary_column_view">
                        <style>
                          <class name="data-table"/>
                        </style>
                        <property name="show-column-separators">true</property>
                        <property name="show-row-separators">true</property>
                        <property name="model">
                          <object class="GtkNoSelection">
                            <property name="model">
                              <object class="GtkSortListModel">
                                <binding name="sorter">
                                  <lookup name="sorter">summary_column_view</lookup>
                                </binding>
                                <!-- it might be nice to update these by selection -->
                                <property name="model">
                                  <object class="GtkFlattenListModel">
                                    <binding name="model">
                                      <lookup name="marks-catalog" type="SysprofDocument">
                                        <lookup name="document" type="SysprofSession">
                                          <lookup name="session">SysprofMarksSection</lookup>
                                        </lookup>
                                      </lookup>
                                    </binding>
                                  </object>
                                </property>
                              </object>
                            </property>
                          </object>
                        </property>
                        <child>
                          <object class="GtkColumnViewColumn">
                            <property name="title" translatable="yes">Category</property>
                            <property name="sorter">
                              <object class="GtkStringSorter">
                                <property name="expression">
                                  <lookup name="group" type="SysprofMarkCatalog"/>
                                </property>
                              </object>
                            </property>
                            <property name="factory">
                              <object class="GtkBuilderListItemFactory">
                                <property name="bytes"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="GtkListItem">
    <property name="child">
      <object class="GtkLabel">
        <property name="xalign">0</property>
        <binding name="label">
          <lookup name="group" type="SysprofMarkCatalog">
            <lookup name="item">GtkListItem</lookup>
          </lookup>
        </binding>
      </object>
    </property>
  </template>
</interface>
]]>
                                </property>
                              </object>
                            </property>
                          </object>
                        </child>
                        <child>
                          <object class="GtkColumnViewColumn">
                            <property name="title" translatable="yes">Name</property>
                            <property name="expand">true</property>
                            <property name="sorter">
                              <object class="GtkStringSorter">
                                <property name="expression">
                                  <lookup name="name" type="SysprofMarkCatalog"/>
                                </property>
                              </object>
                            </property>
                            <property name="factory">
                              <object class="GtkBuilderListItemFactory">
                                <property name="bytes"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="GtkListItem">
    <property name="child">
      <object class="GtkLabel">
        <property name="xalign">0</property>
        <binding name="label">
          <lookup name="name" type="SysprofMarkCatalog">
            <lookup name="item">GtkListItem</lookup>
          </lookup>
        </binding>
      </object>
    </property>
  </template>
</interface>
]]>
                                </property>
                              </object>
                            </property>
                          </object>
                        </child>
                        <child>
                          <object class="GtkColumnViewColumn">
                            <property name="title" translatable="yes">Minimum</property>
                            <property name="sorter">
                              <object class="GtkNumericSorter">
                                <property name="expression">
                                  <lookup name="min-duration" type="SysprofMarkCatalog"/>
                                </property>
                              </object>
                            </property>
                            <property name="factory">
                              <object class="GtkBuilderListItemFactory">
                                <property name="bytes"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="GtkListItem">
    <property name="child">
      <object class="SysprofTimeLabel">
        <property name="show-zero">false</property>
        <binding name="duration">
          <lookup name="min-duration" type="SysprofMarkCatalog">
            <lookup name="item">GtkListItem</lookup>
          </lookup>
        </binding>
      </object>
    </property>
  </template>
</interface>
]]>
                                </property>
                              </object>
                            </property>
                          </object>
                        </child>
                        <child>
                          <object class="GtkColumnViewColumn">
                            <property name="title" translatable="yes">Maximum</property>
                            <property name="sorter">
                              <object class="GtkNumericSorter">
                                <property name="expression">
                                  <lookup name="max-duration" type="SysprofMarkCatalog"/>
                                </property>
                              </object>
                            </property>
                            <property name="factory">
                              <object class="GtkBuilderListItemFactory">
                                <property name="bytes"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="GtkListItem">
    <property name="child">
      <object class="SysprofTimeLabel">
        <property name="show-zero">false</property>
        <binding name="duration">
          <lookup name="max-duration" type="SysprofMarkCatalog">
            <lookup name="item">GtkListItem</lookup>
          </lookup>
        </binding>
      </object>
    </property>
  </template>
</interface>
]]>
                                </property>
                              </object>
                            </property>
                          </object>
                        </child>
                        <child>
                          <object class="GtkColumnViewColumn">
                            <property name="title" translatable="yes">Average</property>
                            <property name="sorter">
                              <object class="GtkNumericSorter">
                                <property name="expression">
                                  <lookup name="average-duration" type="SysprofMarkCatalog"/>
                                </property>
                              </object>
                            </property>
                            <property name="factory">
                              <object class="GtkBuilderListItemFactory">
                                <property name="bytes"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="GtkListItem">
    <property name="child">
      <object class="SysprofTimeLabel">
        <property name="show-zero">false</property>
        <binding name="duration">
          <lookup name="average-duration" type="SysprofMarkCatalog">
            <lookup name="item">GtkListItem</lookup>
          </lookup>
        </binding>
      </object>
    </property>
  </template>
</interface>
]]>
                                </property>
                              </object>
                            </property>
                          </object>
                        </child>
                        <child>
                          <object class="GtkColumnViewColumn" id="median_column">
                            <property name="title" translatable="yes">Median</property>
                            <property name="sorter">
                              <object class="GtkNumericSorter">
                                <property name="expression">
                                  <lookup name="median-duration" type="SysprofMarkCatalog"/>
                                </property>
                              </object>
                            </property>
                            <property name="factory">
                              <object class="GtkBuilderListItemFactory">
                                <property name="bytes"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="GtkListItem">
    <property name="child">
      <object class="SysprofTimeLabel">
        <property name="show-zero">false</property>
        <binding name="duration">
          <lookup name="median-duration" type="SysprofMarkCatalog">
            <lookup name="item">GtkListItem</lookup>
          </lookup>
        </binding>
      </object>
    </property>
  </template>
</interface>
]]>
                                </property>
                              </object>
                            </property>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                </property>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="AdwViewSwitcherBar" id="switcher">
            <property name="reveal">true</property>
            <property name="stack">stack</property>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>
