From fb49040fbed8c25f10649056193a41f14ba97008 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Wed, 13 Jul 2022 12:04:03 +0200 Subject: [PATCH] Added some ControlTheme benchmarks. --- .../Styling/ControlTheme_Apply.cs | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 tests/Avalonia.Benchmarks/Styling/ControlTheme_Apply.cs diff --git a/tests/Avalonia.Benchmarks/Styling/ControlTheme_Apply.cs b/tests/Avalonia.Benchmarks/Styling/ControlTheme_Apply.cs new file mode 100644 index 0000000000..0c9bcf412f --- /dev/null +++ b/tests/Avalonia.Benchmarks/Styling/ControlTheme_Apply.cs @@ -0,0 +1,147 @@ +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Avalonia.Controls; +using Avalonia.Controls.Primitives; +using Avalonia.Controls.Templates; +using Avalonia.Media; +using Avalonia.Styling; +using BenchmarkDotNet.Attributes; + +#nullable enable + +namespace Avalonia.Benchmarks.Styling +{ + [MemoryDiagnoser] + public class ControlTheme_Apply + { + private ControlTheme _theme; + private ControlTheme _otherTheme; + private List