static void Main(string[] args) { TraceLog.Connect("TestConcurrent2"); List <Task> tasks = new List <Task>(); for (int i = 0; i < 100; i++) { tasks.Add(Task.Factory.StartNew(Print)); } Stopwatch s = new Stopwatch(); s.Start(); Task.WaitAll(tasks.ToArray()); s.Stop(); long time = s.ElapsedMilliseconds; Console.WriteLine(time); LogManager.TraceLog.Flush(); Console.WriteLine("done"); Console.ReadLine(); }
public void Start(string collectionName) { TraceLog.Connect(collectionName); }