UI - Avoid opening the main window multiple times from tray

Profiling - Thread safety and use high precision counters
Profiling - Profile timed updates
Timed updates - Added argument to give timed updates a name
Plugins - Affix plugin folders with a part of the plugin GUID
Debugger - Added 95th percentile column to profiling
Debugger - Fix scrolling in performance profile tab when hovering over datagrids
This commit is contained in:
Robert committed 2021-05-17 17:26:49 +02:00
1 parent 4ab8459927
commit 1660519bee
14 files changed
+315 -185

No files matched your search

@@ -9,6 +9,7 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs.Performance
private string _last;
private string _max;
private string _min;
private string _percentile;
public PerformanceDebugMeasurementViewModel(ProfilingMeasurement measurement)
{
@@ -41,12 +42,19 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs.Performance
set => SetAndNotify(ref _max, value);
}
public string Percentile
{
get => _percentile;
set => SetAndNotify(ref _percentile, value);
}
public void Update()
{
Last = Measurement.GetLast().TotalMilliseconds + " ms";
Average = Measurement.GetAverage().TotalMilliseconds + " ms";
Min = Measurement.GetMin().TotalMilliseconds + " ms";
Max = Measurement.GetMax().TotalMilliseconds + " ms";
Percentile = Measurement.GetPercentile(0.95).TotalMilliseconds + " ms";
}
}
}
@@ -27,6 +27,7 @@
<materialDesign:DataGridTextColumn Binding="{Binding Min}" Header="Min" />
<materialDesign:DataGridTextColumn Binding="{Binding Max}" Header="Max" />
<materialDesign:DataGridTextColumn Binding="{Binding Average}" Header="Average" />
<materialDesign:DataGridTextColumn Binding="{Binding Percentile}" Header="95th percentile" />
</DataGrid.Columns>
</DataGrid>
</StackPanel>
@@ -19,7 +19,7 @@
If you are having performance issues, below you can find out which plugin might be the culprit.
</TextBlock>
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden" PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
<ItemsControl ItemsSource="{Binding Items}" Margin="0 0 10 0">
<ItemsControl.ItemTemplate>
<DataTemplate>
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Artemis.UI.Screens.Settings.Debug.Tabs.Performance
{
/// <summary>
/// Interaction logic for PerformanceDebugView.xaml
/// </summary>
public partial class PerformanceDebugView : UserControl
{
public PerformanceDebugView()
{
InitializeComponent();
}
private void ScrollViewer_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
ScrollViewer scv = (ScrollViewer)sender;
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
e.Handled = true;
}
}
}