Update
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Diagnostics;
|
||||
using MesETL.App.Services.ETL;
|
||||
using Xunit.Abstractions;
|
||||
@@ -67,8 +68,22 @@ public class Test
|
||||
[MemberData(nameof(ParseRowData))]
|
||||
public void ParseRowFasterTest(string row)
|
||||
{
|
||||
var fields = CsvReader.ParseRow(row, '"', ',');
|
||||
var fields = CsvReader.ParseRowFaster(row, '"', ',');
|
||||
_output.WriteLine(string.Join(',', fields));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DictMemoryTest()
|
||||
{
|
||||
var dict = new ConcurrentDictionary<string, string>();
|
||||
for (int i = 0; i < 3000000; i++)
|
||||
{
|
||||
dict.AddOrUpdate(Guid.NewGuid().ToString(), Random.Shared.NextInt64(1000000000L, 9999999999L).ToString(), (_, __) => Random.Shared.NextInt64(1000000000L, 9999999999L).ToString());
|
||||
}
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user