Skip to content

Commit

Permalink
Complete Snappy benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Mutuduxf committed Sep 1, 2023
1 parent 548a820 commit 49444bb
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions perf/Benchmark/Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<ProjectReference Include="..\..\src\Zaabee.LZ4\Zaabee.LZ4.csproj" />
<ProjectReference Include="..\..\src\Zaabee.LZMA\Zaabee.LZMA.csproj" />
<ProjectReference Include="..\..\src\Zaabee.SharpZipLib\Zaabee.SharpZipLib.csproj" />
<ProjectReference Include="..\..\src\Zaabee.Snappy\Zaabee.Snappy.csproj" />
<ProjectReference Include="..\..\src\Zaabee.XZ\Zaabee.XZ.csproj" />
<ProjectReference Include="..\..\src\Zaabee.Zstd\Zaabee.Zstd.csproj" />
</ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions perf/Benchmark/Benchmarks/CompressToBytes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public class CompressToBytes
[Benchmark]
public void LzmaToBytes() => LzmaHelper.Compress(Consts.RawBytes);

[Benchmark]
public void SnappyToBytes() => SnappyHelper.Compress(Consts.RawBytes);

[Benchmark]
public void XzToBytes() => XzHelper.Compress(Consts.RawBytes);

Expand Down
3 changes: 3 additions & 0 deletions perf/Benchmark/Benchmarks/CompressToStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public class CompressToStream
[Benchmark]
public void LzmaToStream() => LzmaHelper.Compress(Consts.RawStream, new MemoryStream());

[Benchmark]
public void SnappyToStream() => SnappyHelper.Compress(Consts.RawStream, new MemoryStream());

[Benchmark]
public void XzToStream() => XzHelper.Compress(Consts.RawStream, new MemoryStream());

Expand Down
3 changes: 3 additions & 0 deletions perf/Benchmark/Benchmarks/DecompressFromBytes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public class DecompressFromBytes
[Benchmark]
public void LzmaFromBytes() => LzmaHelper.Decompress(LzmaCompressBytes);

[Benchmark]
public void SnappyFromBytes() => SnappyHelper.Decompress(XzCompressBytes);

[Benchmark]
public void XzFromBytes() => XzHelper.Decompress(XzCompressBytes);

Expand Down
3 changes: 3 additions & 0 deletions perf/Benchmark/Benchmarks/DecompressFromStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public class DecompressFromStream
[Benchmark]
public void LzmaFromStream() => LzmaHelper.Decompress(LzmaCompressStream, new MemoryStream());

[Benchmark]
public void SnappyFromStream() => SnappyHelper.Decompress(XzCompressStream, new MemoryStream());

[Benchmark]
public void XzFromStream() => XzHelper.Decompress(XzCompressStream, new MemoryStream());

Expand Down
1 change: 1 addition & 0 deletions perf/Benchmark/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
global using Zaabee.LZ4;
global using Zaabee.LZMA;
global using Zaabee.SharpZipLib;
global using Zaabee.Snappy;
global using Zaabee.XZ;
global using Zaabee.Zstd;

0 comments on commit 49444bb

Please sign in to comment.