Пример #1
0
        private static void Run(DefaultUnleash unleash, UnleashContext context, string name, int maxRounds)
        {
            int currentRound = 0;
            var sw           = new Stopwatch();

            while (currentRound < maxRounds)
            {
                currentRound++;

                sw.Start();
                bool enabled = unleash.IsEnabled("Demo", context);
                sw.Stop();

                Console.WriteLine(name + "\t" + "Demo" + ":" + enabled + "\t " + sw.ElapsedMilliseconds + "ms");
                sw.Reset();

                Thread.Sleep(new Random().Next(10000));
            }
        }