<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:local="clr-namespace:Artemis.UI.Screens.Debugger.Performance"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:DataType="local:PerformanceDebugProfilerViewModel"
             x:Class="Artemis.UI.Screens.Debugger.Performance.PerformanceDebugProfilerView">
    <StackPanel>
        <TextBlock Classes="subtitle" Text="{CompiledBinding Profiler.Name}" Margin="10 10 0 0" />

        <DataGrid ItemsSource="{CompiledBinding Measurements}"
                  CanUserSortColumns="True"
                  IsReadOnly="True"
                  AutoGenerateColumns="False"
                  CanUserReorderColumns="False"
                  CanUserResizeColumns="False"
                  Margin="10 5 10 10">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{CompiledBinding Measurement.Identifier}" Header="Identifier" />
                <DataGridTextColumn Binding="{CompiledBinding Last}" Header="Last" />
                <DataGridTextColumn Binding="{CompiledBinding Min}" Header="Min" />
                <DataGridTextColumn Binding="{CompiledBinding Max}" Header="Max" />
                <DataGridTextColumn Binding="{CompiledBinding Average}" Header="Average" />
                <DataGridTextColumn Binding="{CompiledBinding Percentile}" Header="95th percentile" />
                <DataGridTextColumn Binding="{CompiledBinding Count}" Header="Number of Calls" />
            </DataGrid.Columns>
        </DataGrid>
    </StackPanel>
</UserControl>