コード例 #1
0
ファイル: Program.cs プロジェクト: VenuC/MiniProfiler.Windows
        private static void Main()
        {
            //Start profiling
            ConsoleProfiling.Start();

            using (StackExchange.Profiling.MiniProfiler.Current.Step("Call Methods"))
            {
                DoTheQuickWork();
                DoTheSlowWork();
            }

            //Stop profiling and show results
            Console.WriteLine(ConsoleProfiling.StopAndGetConsoleFriendlyOutputString());

            //Allow viewing of results
            Console.WriteLine("... press 'Enter' to exit process ...");
            Console.ReadLine();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: bonza/MiniProfiler.Windows
        private static void Main(string[] args)
        {
            //Configure building blocks
            ConfigureIocAndAop();

            //Start profiling
            ConsoleProfiling.Start();

            //Run the application
            var app = _container.Resolve <IConsoleApplication>();

            app.Run();

            //Stop profiling and show results
            Console.WriteLine(ConsoleProfiling.StopAndGetConsoleFriendlyOutputStringWithSqlTimings());

            //Allow viewing of results
            Console.WriteLine("... press 'Enter' to exit process ...");
            Console.ReadLine();
        }