public DisassemblyDiagnoser(DisassemblyDiagnoserConfig config)
        {
            Config = config;
            windowsDisassembler = new WindowsDisassembler(config);
            linuxDisassembler   = new LinuxDisassembler(config);
            monoDisassembler    = new MonoDisassembler(config);

            results   = new Dictionary <BenchmarkCase, DisassemblyResult>();
            Exporters = GetExporters(results, config);
        }
Esempio n. 2
0
        public DisassemblyDiagnoser(DisassemblyDiagnoserConfig config)
        {
            Config = config;
            windowsDifferentArchitectureDisassembler = new WindowsDisassembler(config);
            sameArchitectureDisassembler             = new SameArchitectureDisassembler(config);
            monoDisassembler = new MonoDisassembler(config);

            results   = new Dictionary <BenchmarkCase, DisassemblyResult>();
            Exporters = GetExporters(results, config);
        }
Esempio n. 3
0
        internal DisassemblyDiagnoser(WindowsDisassembler windowsDisassembler, MonoDisassembler monoDisassembler)
        {
            this.windowsDisassembler = windowsDisassembler;
            this.monoDisassembler    = monoDisassembler;

            results   = new Dictionary <Benchmark, DisassemblyResult>();
            Exporters = new IExporter[]
            {
                new CombinedDisassemblyExporter(results),
                new RawDisassemblyExporter(results),
                new PrettyDisassemblyExporter(results)
            };
        }
Esempio n. 4
0
        private DisassemblyDiagnoser(WindowsDisassembler windowsDisassembler, MonoDisassembler monoDisassembler, DisassemblyDiagnoserConfig config)
        {
            Config = config;
            this.windowsDisassembler = windowsDisassembler;
            this.monoDisassembler    = monoDisassembler;

            results   = new Dictionary <BenchmarkCase, DisassemblyResult>();
            Exporters = new IExporter[]
            {
                new CombinedDisassemblyExporter(results),
                new RawDisassemblyExporter(results),
                new PrettyHtmlDisassemblyExporter(results),
                new PrettyGithubMarkdownDisassemblyExporter(results)
            };
        }
        public void Handle(HostSignal signal, DiagnoserActionParameters parameters)
        {
            var benchmark = parameters.BenchmarkCase;

            switch (signal)
            {
            case HostSignal.AfterAll when ShouldUseWindowsDisassembler(benchmark):
                results.Add(benchmark, windowsDisassembler.Disassemble(parameters));

                break;

            case HostSignal.SeparateLogic when ShouldUseMonoDisassembler(benchmark):
                results.Add(benchmark, MonoDisassembler.Disassemble(benchmark, benchmark.Job.Environment.Runtime as MonoRuntime));

                break;
            }
        }
 internal DisassemblyDiagnoser(WindowsDisassembler windowsDisassembler, MonoDisassembler monoDisassembler)
 {
     this.windowsDisassembler = windowsDisassembler;
     this.monoDisassembler    = monoDisassembler;
 }