aboutsummaryrefslogtreecommitdiff
path: root/benches/Jellyfin.Common.Benches/HexEncodeBenches.cs
diff options
context:
space:
mode:
Diffstat (limited to 'benches/Jellyfin.Common.Benches/HexEncodeBenches.cs')
-rw-r--r--benches/Jellyfin.Common.Benches/HexEncodeBenches.cs32
1 files changed, 0 insertions, 32 deletions
diff --git a/benches/Jellyfin.Common.Benches/HexEncodeBenches.cs b/benches/Jellyfin.Common.Benches/HexEncodeBenches.cs
deleted file mode 100644
index 7abf93c51..000000000
--- a/benches/Jellyfin.Common.Benches/HexEncodeBenches.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-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("-", "");
- }
-}