From 55bd294705ae6bae9403a75bda4b20515d727299 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Tue, 6 Sep 2022 21:12:05 +0900 Subject: [PATCH] Add benchmark --- .../BenchmarkInvalidationList.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 osu.Framework.Benchmarks/BenchmarkInvalidationList.cs diff --git a/osu.Framework.Benchmarks/BenchmarkInvalidationList.cs b/osu.Framework.Benchmarks/BenchmarkInvalidationList.cs new file mode 100644 index 000000000..ca4fddb2f --- /dev/null +++ b/osu.Framework.Benchmarks/BenchmarkInvalidationList.cs @@ -0,0 +1,20 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using BenchmarkDotNet.Attributes; +using osu.Framework.Graphics; +using osu.Framework.Layout; + +namespace osu.Framework.Benchmarks +{ + public class BenchmarkInvalidationList + { + private InvalidationList list; + + [Benchmark] + public void Invalidate() => list.Invalidate(InvalidationSource.Self, Invalidation.All); + + [Benchmark] + public void Validate() => list.Validate(Invalidation.All); + } +}