mirror of
https://github.com/aaru-dps/AaruBenchmark.git
synced 2025-12-16 19:24:36 +00:00
Move to block based namespaces so it can compile with .NET Core 3.1.
This commit is contained in:
@@ -8,10 +8,12 @@ using BenchmarkDotNet.Toolchains.CsProj;
|
|||||||
using BenchmarkDotNet.Toolchains.DotNetCli;
|
using BenchmarkDotNet.Toolchains.DotNetCli;
|
||||||
#if NET8_0_OR_GREATER
|
#if NET8_0_OR_GREATER
|
||||||
using AaruBenchmark.Compression;
|
using AaruBenchmark.Compression;
|
||||||
|
|
||||||
|
// ReSharper disable ArrangeNamespaceBody
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace AaruBenchmark;
|
namespace AaruBenchmark
|
||||||
|
{
|
||||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly)]
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly)]
|
||||||
public class Core31RosettaJobAttribute : Attribute, IConfigSource
|
public class Core31RosettaJobAttribute : Attribute, IConfigSource
|
||||||
{
|
{
|
||||||
@@ -558,3 +560,4 @@ public class SpamSumBenchs
|
|||||||
[Benchmark]
|
[Benchmark]
|
||||||
public void ssdeep() => Checksums.Aaru.CliSpamSum();
|
public void ssdeep() => Checksums.Aaru.CliSpamSum();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -5,8 +5,10 @@ using System.Linq;
|
|||||||
using Aaru.Checksums;
|
using Aaru.Checksums;
|
||||||
using Aaru.CommonTypes.Interfaces;
|
using Aaru.CommonTypes.Interfaces;
|
||||||
|
|
||||||
namespace AaruBenchmark.Checksums;
|
// ReSharper disable ArrangeNamespaceBody
|
||||||
|
|
||||||
|
namespace AaruBenchmark.Checksums
|
||||||
|
{
|
||||||
public class Aaru
|
public class Aaru
|
||||||
{
|
{
|
||||||
static readonly byte[] _expectedRandomAdler32 =
|
static readonly byte[] _expectedRandomAdler32 =
|
||||||
@@ -343,3 +345,4 @@ public class Aaru
|
|||||||
throw new Exception("Invalid hash value");
|
throw new Exception("Invalid hash value");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -3,8 +3,10 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace AaruBenchmark.Checksums;
|
// ReSharper disable ArrangeNamespaceBody
|
||||||
|
|
||||||
|
namespace AaruBenchmark.Checksums
|
||||||
|
{
|
||||||
public class OpenSsl
|
public class OpenSsl
|
||||||
{
|
{
|
||||||
static readonly byte[] _expectedRandomMd5 =
|
static readonly byte[] _expectedRandomMd5 =
|
||||||
@@ -244,3 +246,4 @@ public class OpenSsl
|
|||||||
throw new Exception("Invalid hash value");
|
throw new Exception("Invalid hash value");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -3,8 +3,10 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace AaruBenchmark.Checksums;
|
// ReSharper disable ArrangeNamespaceBody
|
||||||
|
|
||||||
|
namespace AaruBenchmark.Checksums
|
||||||
|
{
|
||||||
public class RHash
|
public class RHash
|
||||||
{
|
{
|
||||||
const uint RHASH_CRC32 = 0x01;
|
const uint RHASH_CRC32 = 0x01;
|
||||||
@@ -263,3 +265,4 @@ public class RHash
|
|||||||
throw new Exception("Invalid hash value");
|
throw new Exception("Invalid hash value");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,17 @@
|
|||||||
using System.IO;
|
|
||||||
#if NET8_0_OR_GREATER
|
#if NET8_0_OR_GREATER
|
||||||
using Aaru6.Checksums;
|
using Aaru6.Checksums;
|
||||||
#else
|
#else
|
||||||
using Aaru.Checksums;
|
using Aaru.Checksums;
|
||||||
#endif
|
#endif
|
||||||
|
using System.IO;
|
||||||
using Aaru.Compression;
|
using Aaru.Compression;
|
||||||
using CUETools.Codecs;
|
using CUETools.Codecs;
|
||||||
using CUETools.Codecs.Flake;
|
using CUETools.Codecs.Flake;
|
||||||
|
|
||||||
namespace AaruBenchmark.Compression;
|
// ReSharper disable ArrangeNamespaceBody
|
||||||
|
|
||||||
|
namespace AaruBenchmark.Compression
|
||||||
|
{
|
||||||
public class Aaru
|
public class Aaru
|
||||||
{
|
{
|
||||||
public static void AppleRle()
|
public static void AppleRle()
|
||||||
@@ -132,3 +134,4 @@ public class Aaru
|
|||||||
flakeWriter.Write(audioBuffer);
|
flakeWriter.Write(audioBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -2,8 +2,10 @@ using System.IO;
|
|||||||
using Ionic.BZip2;
|
using Ionic.BZip2;
|
||||||
using Ionic.Zlib;
|
using Ionic.Zlib;
|
||||||
|
|
||||||
namespace AaruBenchmark.Compression;
|
// ReSharper disable ArrangeNamespaceBody
|
||||||
|
|
||||||
|
namespace AaruBenchmark.Compression
|
||||||
|
{
|
||||||
public static class DotNetZip
|
public static class DotNetZip
|
||||||
{
|
{
|
||||||
public static void Gzip()
|
public static void Gzip()
|
||||||
@@ -158,3 +160,4 @@ public static class DotNetZip
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
|
|
||||||
namespace AaruBenchmark.Compression;
|
// ReSharper disable ArrangeNamespaceBody
|
||||||
|
|
||||||
|
namespace AaruBenchmark.Compression
|
||||||
|
{
|
||||||
public static class NetRuntime
|
public static class NetRuntime
|
||||||
{
|
{
|
||||||
public static void Gzip()
|
public static void Gzip()
|
||||||
@@ -81,3 +83,4 @@ public static class NetRuntime
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -1,17 +1,19 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
#if NET8_0_OR_GREATER
|
|
||||||
using Aaru6.Checksums;
|
|
||||||
#else
|
|
||||||
using Aaru.Checksums;
|
|
||||||
#endif
|
|
||||||
using SharpCompress.Compressors;
|
using SharpCompress.Compressors;
|
||||||
using SharpCompress.Compressors.ADC;
|
using SharpCompress.Compressors.ADC;
|
||||||
using SharpCompress.Compressors.BZip2;
|
using SharpCompress.Compressors.BZip2;
|
||||||
using SharpCompress.Compressors.Deflate;
|
using SharpCompress.Compressors.Deflate;
|
||||||
using SharpCompress.Compressors.LZMA;
|
using SharpCompress.Compressors.LZMA;
|
||||||
|
#if NET8_0_OR_GREATER
|
||||||
|
using Aaru6.Checksums;
|
||||||
|
#else
|
||||||
|
using Aaru.Checksums;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace AaruBenchmark.Compression;
|
// ReSharper disable ArrangeNamespaceBody
|
||||||
|
|
||||||
|
namespace AaruBenchmark.Compression
|
||||||
|
{
|
||||||
public static class SharpCompress
|
public static class SharpCompress
|
||||||
{
|
{
|
||||||
public static void Gzip()
|
public static void Gzip()
|
||||||
@@ -354,3 +356,4 @@ public static class SharpCompress
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -4,8 +4,10 @@ using System.IO;
|
|||||||
using BenchmarkDotNet.Configs;
|
using BenchmarkDotNet.Configs;
|
||||||
using BenchmarkDotNet.Running;
|
using BenchmarkDotNet.Running;
|
||||||
|
|
||||||
namespace AaruBenchmark;
|
// ReSharper disable ArrangeNamespaceBody
|
||||||
|
|
||||||
|
namespace AaruBenchmark
|
||||||
|
{
|
||||||
static class Program
|
static class Program
|
||||||
{
|
{
|
||||||
internal static string Folder => Path.Combine(Environment.CurrentDirectory, "data");
|
internal static string Folder => Path.Combine(Environment.CurrentDirectory, "data");
|
||||||
@@ -43,3 +45,4 @@ static class Program
|
|||||||
BenchmarkRunner.Run<SpamSumBenchs>(config);
|
BenchmarkRunner.Run<SpamSumBenchs>(config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user