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
{ {
@@ -26,6 +27,8 @@ namespace Wox
} }
protected override void OnStartup(StartupEventArgs e) protected override void OnStartup(StartupEventArgs e)
{
using (new Timeit("Startup Time"))
{ {
base.OnStartup(e); base.OnStartup(e);
DispatcherUnhandledException += ErrorReporting.DispatcherUnhandledException; DispatcherUnhandledException += ErrorReporting.DispatcherUnhandledException;
@@ -37,6 +40,8 @@ namespace Wox
CommandArgsFactory.Execute(e.Args.ToList()); CommandArgsFactory.Execute(e.Args.ToList());
} }
}
public bool OnActivate(IList<string> args) public bool OnActivate(IList<string> args)
{ {
CommandArgsFactory.Execute(args); CommandArgsFactory.Execute(args);