зеркало из https://github.com/microsoft/rudder.git
Nothing relevant
This commit is contained in:
Родитель
fe97df269d
Коммит
92ef8aed06
|
@ -102,7 +102,7 @@ namespace ScopeProgramAnalysis
|
||||||
// Example 4
|
// Example 4
|
||||||
//input = Path.Combine(zvonimirDirectory, @"2407f5f1-0930-4ce5-88d3-e288a86e54ca\__ScopeCodeGen__.dll");
|
//input = Path.Combine(zvonimirDirectory, @"2407f5f1-0930-4ce5-88d3-e288a86e54ca\__ScopeCodeGen__.dll");
|
||||||
// Example 5
|
// Example 5
|
||||||
//input = Path.Combine(zvonimirDirectory, @"3b9f1ec4-0ad8-4bde-879b-65c92d109159\__ScopeCodeGen__.dll");
|
input = Path.Combine(zvonimirDirectory, @"3b9f1ec4-0ad8-4bde-879b-65c92d109159\__ScopeCodeGen__.dll");
|
||||||
|
|
||||||
//const string input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\0003cc74-a571-4638-af03-77775c5542c6\__ScopeCodeGen__.dll";
|
//const string input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\0003cc74-a571-4638-af03-77775c5542c6\__ScopeCodeGen__.dll";
|
||||||
//const string input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\10c15390-ea74-4b20-b87e-3f3992a130c0\__ScopeCodeGen__.dll";
|
//const string input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\10c15390-ea74-4b20-b87e-3f3992a130c0\__ScopeCodeGen__.dll";
|
||||||
|
@ -110,7 +110,7 @@ namespace ScopeProgramAnalysis
|
||||||
//const string input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\0ab0de7e-6110-4cd4-8c30-6e72c013c2f0\__ScopeCodeGen__.dll";
|
//const string input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\0ab0de7e-6110-4cd4-8c30-6e72c013c2f0\__ScopeCodeGen__.dll";
|
||||||
|
|
||||||
// Mike's example:
|
// Mike's example:
|
||||||
input = @"\\research\root\public\mbarnett\Parasail\Diego\SimpleProcessors_9E4B4B56B06EFFD2\__ScopeCodeGen__.dll";
|
//input = @"\\research\root\public\mbarnett\Parasail\Diego\SimpleProcessors_9E4B4B56B06EFFD2\__ScopeCodeGen__.dll";
|
||||||
|
|
||||||
//const string input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\02e7c1bd-42ab-4f5b-8506-d6c49e562790\__ScopeCodeGen__.dll";
|
//const string input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\02e7c1bd-42ab-4f5b-8506-d6c49e562790\__ScopeCodeGen__.dll";
|
||||||
|
|
||||||
|
@ -134,18 +134,24 @@ namespace ScopeProgramAnalysis
|
||||||
//input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\00f41d12-10e8-4aa4-b54d-1c275bd99550\__ScopeCodeGen__.dll";
|
//input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\00f41d12-10e8-4aa4-b54d-1c275bd99550\__ScopeCodeGen__.dll";
|
||||||
|
|
||||||
// This one show me the problem in the topological order
|
// This one show me the problem in the topological order
|
||||||
input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\4554b01e-829b-4e37-b818-688b074b00bf\__ScopeCodeGen__.dll";
|
//input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\4554b01e-829b-4e37-b818-688b074b00bf\__ScopeCodeGen__.dll";
|
||||||
|
|
||||||
// This one is complaining about a missing schema
|
// This one is complaining about a missing schema
|
||||||
input = @"\\research\root\public\mbarnett\Parasail\First100JobsFromMadan\00e0c351-4bae-4970-989b-92806b1e657c\__ScopeCodeGen__.dll";
|
//input = @"\\research\root\public\mbarnett\Parasail\First100JobsFromMadan\00e0c351-4bae-4970-989b-92806b1e657c\__ScopeCodeGen__.dll";
|
||||||
// This one fails with changes of type edgardo did:
|
// This one fails with changes of type edgardo did:
|
||||||
input = @"\\research\root\public\mbarnett\Parasail\First100JobsFromMadan\0b5243a6-cf68-4c35-8b45-8ce0e0162e14\__ScopeCodeGen__.dll";
|
//input = @"\\research\root\public\mbarnett\Parasail\First100JobsFromMadan\0b5243a6-cf68-4c35-8b45-8ce0e0162e14\__ScopeCodeGen__.dll";
|
||||||
|
|
||||||
// Could not find column
|
// Could not find column
|
||||||
//input = @" \\research\root\public\mbarnett\Parasail\First100JobsFromMadan\0c92351b-f81e-4da1-91c3-930c7778fac6\__ScopeCodeGen__.dll";
|
//input = @" \\research\root\public\mbarnett\Parasail\First100JobsFromMadan\0c92351b-f81e-4da1-91c3-930c7778fac6\__ScopeCodeGen__.dll";
|
||||||
|
|
||||||
// Failed to find Schema
|
// Failed to find Schema
|
||||||
input = @"\\research\root\public\mbarnett\Parasail\First100JobsFromMadan\0c92351b-f81e-4da1-91c3-930c7778fac6\__ScopeCodeGen__.dll";
|
//input = @"\\research\root\public\mbarnett\Parasail\First100JobsFromMadan\0c92351b-f81e-4da1-91c3-930c7778fac6\__ScopeCodeGen__.dll";
|
||||||
|
|
||||||
|
// Has 27 passthrough out of 31 out
|
||||||
|
input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\02c4581e-781a-4798-8875-162b4d740b5f\__ScopeCodeGen__.dll";
|
||||||
|
|
||||||
|
// Can not find methods in the factory
|
||||||
|
input = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug\0e4ca5d2-3478-431f-a4ad-f0b256780daf\__ScopeCodeGen__.dll";
|
||||||
|
|
||||||
|
|
||||||
string[] directories = Path.GetDirectoryName(input).Split(Path.DirectorySeparatorChar);
|
string[] directories = Path.GetDirectoryName(input).Split(Path.DirectorySeparatorChar);
|
||||||
|
|
|
@ -19,30 +19,51 @@ namespace ScopeAnalysisBulkScripts
|
||||||
|
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
var doOnlyPassthrough = true;
|
||||||
|
var doAnalysis = !doOnlyPassthrough;
|
||||||
|
|
||||||
var analysisClient = @"C:\Users\t-diga\Source\Repos\rudder-github\AnalysisClient\bin\Debug\AnalysisClient.exe";
|
var analysisClient = @"C:\Users\t-diga\Source\Repos\rudder-github\AnalysisClient\bin\Debug\AnalysisClient.exe";
|
||||||
var outputAnalyzer = @"C:\Users\t-diga\Source\Repos\rudder-github\CompareAnalysisOutput\Compare\bin\Debug\Compare.exe";
|
var outputAnalyzer = @"C:\Users\t-diga\Source\Repos\rudder-github\CompareAnalysisOutput\Compare\bin\Debug\Compare.exe";
|
||||||
|
|
||||||
|
|
||||||
var inputFolder = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug";
|
var inputFolder = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug";
|
||||||
|
if(doOnlyPassthrough)
|
||||||
|
{
|
||||||
|
inputFolder = @"C:\temp\Madam";
|
||||||
|
}
|
||||||
|
//inputFolder = @"\\research\root\public\mbarnett\Parasail\First100JobsFromMadan";
|
||||||
//var inputFolder = @"D:\Madam3";
|
//var inputFolder = @"D:\Madam3";
|
||||||
//inputFolder = @"C:\temp\Madam";
|
//inputFolder = @"C:\temp\Madam";
|
||||||
|
|
||||||
var inputList = @"C:\Temp\Zvo\inputDlls.txt";
|
var inputList = @"C:\Temp\Zvo\inputDlls.txt";
|
||||||
//var inputList = @"C:\Temp\Zvo\sampleDlls.txt";
|
//var inputList = @"C:\Temp\Zvo\sampleDlls.txt";
|
||||||
var outputFolder = @"C:\Temp\Madam";
|
var outputFolder = @"C:\Temp\Madam";
|
||||||
|
//outputFolder = @"C:\Temp\Mike100";
|
||||||
//outputFolder = @"C:\temp\ZvoList";
|
//outputFolder = @"C:\temp\ZvoList";
|
||||||
|
|
||||||
var logPath = outputFolder;
|
var logPath = outputFolder;
|
||||||
|
|
||||||
var bulkAnalysis = new BulkAnalysis();
|
var bulkAnalysis = new BulkAnalysis();
|
||||||
|
|
||||||
|
|
||||||
//var dllList = bulkAnalysis.LoadListFromFile(inputList);
|
//var dllList = bulkAnalysis.LoadListFromFile(inputList);
|
||||||
var dllList = bulkAnalysis.LoadFromDirectory(inputFolder);
|
IList<string> dllList;
|
||||||
//var dllList = bulkAnalysis.LoadSarifFromDirectory(inputFolder);
|
if(doOnlyPassthrough)
|
||||||
|
{
|
||||||
|
dllList = bulkAnalysis.LoadSarifFromDirectory(inputFolder);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dllList = bulkAnalysis.LoadFromDirectory(inputFolder);
|
||||||
|
}
|
||||||
|
|
||||||
Stopwatch stopWatch = new Stopwatch();
|
Stopwatch stopWatch = new Stopwatch();
|
||||||
stopWatch.Start();
|
stopWatch.Start();
|
||||||
|
|
||||||
bulkAnalysis.ProcessDLLs(dllList, analysisClient, outputFolder, outputFolder);
|
if (doAnalysis)
|
||||||
|
{
|
||||||
|
bulkAnalysis.ProcessDLLs(dllList, analysisClient, outputFolder, outputFolder);
|
||||||
|
}
|
||||||
|
|
||||||
stopWatch.Stop();
|
stopWatch.Stop();
|
||||||
TimeSpan ts = stopWatch.Elapsed;
|
TimeSpan ts = stopWatch.Elapsed;
|
||||||
|
@ -50,7 +71,7 @@ namespace ScopeAnalysisBulkScripts
|
||||||
stopWatch.Reset();
|
stopWatch.Reset();
|
||||||
stopWatch.Start();
|
stopWatch.Start();
|
||||||
|
|
||||||
bulkAnalysis.AnalyzeOutput(dllList, outputAnalyzer, outputFolder);
|
bulkAnalysis.AnalyzeOutput(dllList, outputAnalyzer, outputFolder, doOnlyPassthrough);
|
||||||
|
|
||||||
//analysisFolder = @"D:\MadanExamples\";
|
//analysisFolder = @"D:\MadanExamples\";
|
||||||
///AnalyzeScopeScripts(new string[] { analysisFolder, @"C:\Temp\", "Reducer" });
|
///AnalyzeScopeScripts(new string[] { analysisFolder, @"C:\Temp\", "Reducer" });
|
||||||
|
@ -98,7 +119,7 @@ namespace ScopeAnalysisBulkScripts
|
||||||
private IList<string> LoadSarifFromDirectory(string inputFolder)
|
private IList<string> LoadSarifFromDirectory(string inputFolder)
|
||||||
{
|
{
|
||||||
const string inputDllName = "*.sarif";
|
const string inputDllName = "*.sarif";
|
||||||
string[] files = Directory.GetFiles(inputFolder, inputDllName, SearchOption.AllDirectories);
|
string[] files = Directory.GetFiles(inputFolder, inputDllName, SearchOption.TopDirectoryOnly);
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
private void ProcessDLLs(IList<string> inputs, string scopeAnalyzerPath, string outputFolder, string logFolder)
|
private void ProcessDLLs(IList<string> inputs, string scopeAnalyzerPath, string outputFolder, string logFolder)
|
||||||
|
@ -140,7 +161,7 @@ namespace ScopeAnalysisBulkScripts
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AnalyzeOutput(IList<string> inputs, string outputAnalyzerPath, string outputFolder)
|
private void AnalyzeOutput(IList<string> inputs, string outputAnalyzerPath, string outputFolder, bool doOnlyPassthrough)
|
||||||
{
|
{
|
||||||
var tasks = new List<Task>();
|
var tasks = new List<Task>();
|
||||||
for (int j = 0; j < inputs.Count; j++)
|
for (int j = 0; j < inputs.Count; j++)
|
||||||
|
@ -151,9 +172,16 @@ namespace ScopeAnalysisBulkScripts
|
||||||
{
|
{
|
||||||
var folder = Path.GetDirectoryName(input);
|
var folder = Path.GetDirectoryName(input);
|
||||||
string[] directories = folder.Split(Path.DirectorySeparatorChar);
|
string[] directories = folder.Split(Path.DirectorySeparatorChar);
|
||||||
var sarifFilePath = Path.Combine(outputFolder, directories.Last()) + "_" + Path.ChangeExtension(Path.GetFileName(input), ".sarif");
|
string sarifFilePath;
|
||||||
//var sarifFilePath = input;
|
if (doOnlyPassthrough)
|
||||||
|
{
|
||||||
|
sarifFilePath = input;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sarifFilePath = Path.Combine(outputFolder, directories.Last()) + "_" + Path.ChangeExtension(Path.GetFileName(input), ".sarif");
|
||||||
|
}
|
||||||
|
|
||||||
var comparerProcess = new Process();
|
var comparerProcess = new Process();
|
||||||
comparerProcess.StartInfo.FileName = outputAnalyzerPath;
|
comparerProcess.StartInfo.FileName = outputAnalyzerPath;
|
||||||
comparerProcess.StartInfo.Arguments = String.Format("{0}", sarifFilePath);
|
comparerProcess.StartInfo.Arguments = String.Format("{0}", sarifFilePath);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче