Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsitnik authored May 23, 2023
1 parent 2a6d44d commit 94626f3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/benchmarks/micro/libraries/System.Formats.Tar/Perf.Tar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,20 @@ namespace System.Formats.Tar.Tests
public class Perf_TarWriter
{
private static readonly string _fileName = "file.txt";
private static Dictionary<string, string> _ea;
private static MemoryStream _memoryStream;
private Dictionary<string, string> _ea;
private MemoryStream _memoryStream;

[GlobalSetup]
public void Setup()
{
_memoryStream = new MemoryStream();
}
public void Setup() => _memoryStream = new MemoryStream();

[GlobalCleanup]
public void Cleanup() => _memoryStream.Dispose();

[GlobalSetup(Targets = new[] { nameof(PaxTarEntry_WriteEntry), nameof(PaxTarEntry_WriteEntry_Async) })]
public void SetupPax()
{
Setup();

_ea = new Dictionary<string, string>
{
{ "uname", "username" },
Expand Down

0 comments on commit 94626f3

Please sign in to comment.