Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/src/commit/18075dd3e8bbb34a56ec2c6f40cacf0b99398816/benches/Jellyfin.Common.Benches/HexEncodeBenches.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
jellyfin/benches/Jellyfin.Common.Benches/HexEncodeBenches.cs

33 lines
791 B

using System;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using MediaBrowser.Common;
namespace Jellyfin.Common.Benches
{
[MemoryDiagnoser]
public class HexEncodeBenches
{
private byte[] _data;
[Params(0, 10, 100, 1000, 10000, 1000000)]
public int N { get; set; }
[GlobalSetup]
public void GlobalSetup()
{
_data = new byte[N];
new Random(42).NextBytes(_data);
}
[Benchmark]
public string HexEncode() => Hex.Encode(_data);
[Benchmark]
public string BitConverterToString() => BitConverter.ToString(_data);
[Benchmark]
public string BitConverterToStringWithReplace() => BitConverter.ToString(_data).Replace("-", "");
}
}