Add SpawnEquipDeleteBenchmark (#19566)
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Running;
|
||||
using Content.IntegrationTests;
|
||||
using Content.Server.Maps;
|
||||
#if DEBUG
|
||||
using BenchmarkDotNet.Configs;
|
||||
#else
|
||||
using Robust.Benchmarks.Configs;
|
||||
#endif
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Benchmarks
|
||||
@@ -25,6 +28,7 @@ namespace Content.Benchmarks
|
||||
var gameMaps = pair.Server.ResolveDependency<IPrototypeManager>().EnumeratePrototypes<GameMapPrototype>().ToList();
|
||||
MapLoadBenchmark.MapsSource = gameMaps.Select(x => x.ID);
|
||||
await pair.CleanReturnAsync();
|
||||
PoolManager.Shutdown();
|
||||
|
||||
#if DEBUG
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
@@ -35,8 +39,6 @@ namespace Content.Benchmarks
|
||||
var config = Environment.GetEnvironmentVariable("ROBUST_BENCHMARKS_ENABLE_SQL") != null ? DefaultSQLConfig.Instance : null;
|
||||
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, config);
|
||||
#endif
|
||||
|
||||
PoolManager.Shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user