mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
Add benchmark
This commit is contained in:
20
osu.Framework.Benchmarks/BenchmarkInvalidationList.cs
Normal file
20
osu.Framework.Benchmarks/BenchmarkInvalidationList.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user