打印混淆耗各个pass耗时和总耗时
parent
dcd38e288b
commit
f0c09ad741
|
@ -90,14 +90,17 @@ namespace Obfuz
|
||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
Debug.Log($"Obfuscator Run. begin");
|
Debug.Log($"Obfuscator begin");
|
||||||
|
var sw = new System.Diagnostics.Stopwatch();
|
||||||
|
sw.Start();
|
||||||
FileUtil.RecreateDir(_coreSettings.obfuscatedAssemblyOutputPath);
|
FileUtil.RecreateDir(_coreSettings.obfuscatedAssemblyOutputPath);
|
||||||
FileUtil.RecreateDir(_coreSettings.obfuscatedAssemblyTempOutputPath);
|
FileUtil.RecreateDir(_coreSettings.obfuscatedAssemblyTempOutputPath);
|
||||||
RunPipeline(_pipeline1);
|
RunPipeline(_pipeline1);
|
||||||
_assemblyResolver.InsertFirst(new PathAssemblyResolver(_coreSettings.obfuscatedAssemblyTempOutputPath));
|
_assemblyResolver.InsertFirst(new PathAssemblyResolver(_coreSettings.obfuscatedAssemblyTempOutputPath));
|
||||||
RunPipeline(_pipeline2);
|
RunPipeline(_pipeline2);
|
||||||
FileUtil.CopyDir(_coreSettings.obfuscatedAssemblyTempOutputPath, _coreSettings.obfuscatedAssemblyOutputPath, true);
|
FileUtil.CopyDir(_coreSettings.obfuscatedAssemblyTempOutputPath, _coreSettings.obfuscatedAssemblyOutputPath, true);
|
||||||
Debug.Log($"Obfuscator Run. end");
|
sw.Stop();
|
||||||
|
Debug.Log($"Obfuscator end. cost time: {sw.ElapsedMilliseconds} ms");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RunPipeline(Pipeline pipeline)
|
private void RunPipeline(Pipeline pipeline)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using Obfuz.ObfusPasses;
|
using Obfuz.ObfusPasses;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Obfuz
|
namespace Obfuz
|
||||||
{
|
{
|
||||||
|
@ -34,9 +35,13 @@ namespace Obfuz
|
||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
|
var sw = new Stopwatch();
|
||||||
foreach (var pass in _passes)
|
foreach (var pass in _passes)
|
||||||
{
|
{
|
||||||
|
sw.Restart();
|
||||||
pass.Process();
|
pass.Process();
|
||||||
|
sw.Stop();
|
||||||
|
UnityEngine.Debug.Log($"Pass: {pass.GetType().Name} process cost time: {sw.ElapsedMilliseconds}ms");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue