Add startup time measurement

This commit is contained in:
bao-qian 2015-11-02 02:47:43 +00:00
parent ac3a282876
commit b5a8312167

View File

@ -5,6 +5,7 @@ using System.Windows;
using Wox.CommandArgs; using Wox.CommandArgs;
using Wox.Core.Plugin; using Wox.Core.Plugin;
using Wox.Helper; using Wox.Helper;
using Wox.Infrastructure;
namespace Wox namespace Wox
{ {
@ -27,14 +28,18 @@ namespace Wox
protected override void OnStartup(StartupEventArgs e) protected override void OnStartup(StartupEventArgs e)
{ {
base.OnStartup(e); using (new Timeit("Startup Time"))
DispatcherUnhandledException += ErrorReporting.DispatcherUnhandledException; {
AppDomain.CurrentDomain.UnhandledException += ErrorReporting.UnhandledExceptionHandle; base.OnStartup(e);
DispatcherUnhandledException += ErrorReporting.DispatcherUnhandledException;
AppDomain.CurrentDomain.UnhandledException += ErrorReporting.UnhandledExceptionHandle;
Window = new MainWindow();
PluginManager.Init(Window);
ImageLoader.ImageLoader.PreloadImages();
CommandArgsFactory.Execute(e.Args.ToList());
}
Window = new MainWindow();
PluginManager.Init(Window);
ImageLoader.ImageLoader.PreloadImages();
CommandArgsFactory.Execute(e.Args.ToList());
} }
public bool OnActivate(IList<string> args) public bool OnActivate(IList<string> args)