Kavita/API.Benchmark/CleanTitleBenchmark.cs
Joe Milazzo 9f29fa593d
Progress Overhaul + Profile Page and a LOT more! (#4262)
Co-authored-by: Amelia <77553571+Fesaa@users.noreply.github.com>
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
2025-12-09 10:00:11 -07:00

24 lines
514 B
C#

using System.Collections.Generic;
using System.IO;
using BenchmarkDotNet.Attributes;
namespace API.Benchmark;
[MemoryDiagnoser]
public class CleanTitleBenchmarks
{
private static IList<string> _names;
[GlobalSetup]
public static void LoadData() => _names = File.ReadAllLines("Data/Comics.txt");
[Benchmark]
public static void TestCleanTitle()
{
foreach (var name in _names)
{
Services.Tasks.Scanner.Parser.Parser.CleanTitle(name, true);
}
}
}