Exemplo n.º 1
0
        public void SpeedTestTokenization()
        {            
            long count = 10000;
            System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();
            watch.Start();

            for (long i = 0; i < count; i++)
            {
                string template = app.ThemeManager().GetSystemTemplate("category-grid.html");
                Processor target = new Processor(app, viewBag, template, tagProvider);
                var tokens = target.Tokenize();
                int tokenCount = tokens.Count();
            }

            watch.Stop();
            decimal avg = ((decimal)watch.ElapsedMilliseconds / (decimal)count);
            Console.WriteLine("Avg Milliseconds = " + avg);            
        }