Skip to content

Commit

Permalink
Fix build error in Mzlib benchmarks (#2361)
Browse files Browse the repository at this point in the history
* pass args to BDN so they can be parsed (#2)
---------
Co-authored-by: Adam Sitnik <[email protected]>
  • Loading branch information
VivianaDuenas authored Jul 25, 2023
1 parent 2749c2c commit d9e6156
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Microsoft.ManagedZLib/benchmarks/ManagedZLibBenchmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public void Setup()
Debug.Assert(File != null);
CompressedFile = new CompressedFile(File, Level);
_outputStream = new MemoryStream(CompressedFile.UncompressedData.Length);

}


Expand All @@ -51,7 +52,7 @@ public void DecompressNative()
{
CompressedFile!.CompressedDataStream.Position = 0;
_outputStream!.Position = 0;

System.IO.Compression.DeflateStream decompressor = new System.IO.Compression.DeflateStream(CompressedFile.CompressedDataStream, System.IO.Compression.CompressionMode.Decompress);
decompressor.CopyTo(_outputStream);
}
Expand All @@ -62,13 +63,14 @@ public void DecompressManaged()
CompressedFile!.CompressedDataStream.Position = 0;
_outputStream!.Position = 0;


DeflateStream decompressor = new DeflateStream(CompressedFile.CompressedDataStream, CompressionMode.Decompress);
decompressor.CopyTo(_outputStream);
}

public class ProgramRun
{
static void Main() => BenchmarkRunner.Run<ManagedZLibBenchmark>();
public static void Main(string[] args) => BenchmarkSwitcher.FromAssembly(typeof(ProgramRun).Assembly).Run(args);
}

}

0 comments on commit d9e6156

Please sign in to comment.