1
0
mirror of https://github.com/akpaevj/OneSTools.TechLog.git synced 2024-12-12 08:23:50 +02:00
OneSTools.TechLog/OneSTechLogTest/Program.cs
2019-10-01 14:56:56 +03:00

41 lines
968 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OneSTechLog;
using System.Diagnostics;
namespace OneSTechLogTest
{
class Program
{
static object locker = new object();
static int i = 0;
static async Task Main(string[] args)
{
var parser = new TechLogParser(@"C:\Users\akpaev.e.ENTERPRISE\Desktop\ExpertTools\tl", EventHandler);
var watch = new Stopwatch();
watch.Start();
await parser.Parse();
watch.Stop();
Console.WriteLine($"Считано событий: {i}");
Console.WriteLine($"Время выполнения: {watch.Elapsed}");
Console.ReadKey();
}
private static void EventHandler(Dictionary<string, string> eventData)
{
lock(locker)
{
i++;
}
}
}
}