mirror of https://github.com/ppy/osu
Merge pull request #19059 from andy840119/remove-the-nullable-disable-in-the-benchmark-project
Remove the nullable disable annotation in the benchmark project
This commit is contained in:
commit
315a73fb1b
|
@ -1,8 +1,6 @@
|
|||
// 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.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System.IO;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using osu.Framework.IO.Stores;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// 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.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
|
@ -11,7 +9,7 @@ namespace osu.Game.Benchmarks
|
|||
{
|
||||
public class BenchmarkMod : BenchmarkTest
|
||||
{
|
||||
private OsuModDoubleTime mod;
|
||||
private OsuModDoubleTime mod = null!;
|
||||
|
||||
[Params(1, 10, 100)]
|
||||
public int Times { get; set; }
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// 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.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
|
@ -17,9 +15,9 @@ namespace osu.Game.Benchmarks
|
|||
{
|
||||
public class BenchmarkRealmReads : BenchmarkTest
|
||||
{
|
||||
private TemporaryNativeStorage storage;
|
||||
private RealmAccess realm;
|
||||
private UpdateThread updateThread;
|
||||
private TemporaryNativeStorage storage = null!;
|
||||
private RealmAccess realm = null!;
|
||||
private UpdateThread updateThread = null!;
|
||||
|
||||
[Params(1, 100, 1000)]
|
||||
public int ReadsPerFetch { get; set; }
|
||||
|
@ -135,9 +133,9 @@ public void BenchmarkDetachedPropertyRead()
|
|||
[GlobalCleanup]
|
||||
public void Cleanup()
|
||||
{
|
||||
realm?.Dispose();
|
||||
storage?.Dispose();
|
||||
updateThread?.Exit();
|
||||
realm.Dispose();
|
||||
storage.Dispose();
|
||||
updateThread.Exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// 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.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using BenchmarkDotNet.Engines;
|
||||
using osu.Game.Online.API;
|
||||
|
@ -13,9 +11,9 @@ namespace osu.Game.Benchmarks
|
|||
{
|
||||
public class BenchmarkRuleset : BenchmarkTest
|
||||
{
|
||||
private OsuRuleset ruleset;
|
||||
private APIMod apiModDoubleTime;
|
||||
private APIMod apiModDifficultyAdjust;
|
||||
private OsuRuleset ruleset = null!;
|
||||
private APIMod apiModDoubleTime = null!;
|
||||
private APIMod apiModDifficultyAdjust = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// 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.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using BenchmarkDotNet.Running;
|
||||
using NUnit.Framework;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// 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.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Running;
|
||||
|
||||
|
|
Loading…
Reference in New Issue