Fix C# code benchmark timing regression
This commit is contained in:
@@ -147,7 +147,7 @@ namespace Il2CppInspector
|
||||
|
||||
// Analyze data
|
||||
List<Il2CppInspector> il2cppInspectors;
|
||||
using (var timer = new Benchmark("Analyze IL2CPP data"))
|
||||
using (var il2cppTimer = new Benchmark("Analyze IL2CPP data"))
|
||||
il2cppInspectors = Il2CppInspector.LoadFromFile(options.BinaryFile, options.MetadataFile);
|
||||
|
||||
if (il2cppInspectors == null)
|
||||
@@ -158,12 +158,11 @@ namespace Il2CppInspector
|
||||
foreach (var il2cpp in il2cppInspectors) {
|
||||
// Create model
|
||||
Il2CppModel model;
|
||||
using (var timer1 = new Benchmark("Create type model"))
|
||||
using (var modelTimer = new Benchmark("Create type model"))
|
||||
model = new Il2CppModel(il2cpp);
|
||||
|
||||
// C# signatures output
|
||||
using var timer2 = new Benchmark("Generate C# code");
|
||||
|
||||
using (var signaturesDumperTimer = new Benchmark("Generate C# code")) {
|
||||
var writer = new Il2CppCSharpDumper(model) {
|
||||
ExcludedNamespaces = options.ExcludedNamespaces.ToList(),
|
||||
SuppressMetadata = options.SuppressMetadata,
|
||||
@@ -213,6 +212,7 @@ namespace Il2CppInspector
|
||||
writer.WriteFilesByClassTree(csOut, options.SeparateAssemblyAttributesFiles);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// IDA Python script output
|
||||
using (var scriptDumperTimer = new Benchmark("IDA Python Script Dumper")) {
|
||||
|
||||
Reference in New Issue
Block a user