From a5539d204c219e8fc3cd7ce8533d8c83bff06107 Mon Sep 17 00:00:00 2001 From: garbervetsky Date: Tue, 11 Jul 2017 17:30:35 -0700 Subject: [PATCH 1/2] change ',' delimiter for '+' to avoid problems with generics types with multiple parameters --- CompareAnalysisOutput/Compare/Program.cs | 4 ++-- .../ScopeAnalysisBulkScripts/BulkAnalysis.cs | 15 ++++++++------- ScopeProgramAnalysis/Scripts/process.py | 3 ++- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CompareAnalysisOutput/Compare/Program.cs b/CompareAnalysisOutput/Compare/Program.cs index 5dc86c9..6a71fae 100644 --- a/CompareAnalysisOutput/Compare/Program.cs +++ b/CompareAnalysisOutput/Compare/Program.cs @@ -82,7 +82,7 @@ namespace Compare processorName = run.Id; } - Console.WriteLine("Processor '{0}', Number '{1}'", processorName, processNumber); + Console.WriteLine("Processor '{0}'+ Number '{1}'", processorName, processNumber); var visitedColumns = new HashSet(); @@ -180,7 +180,7 @@ namespace Compare foreach(var entry in analysisStats) { var data = entry.Value; - Console.WriteLine("{0}, {1}, {2}, {3}, {4}, {5}", entry.Key, data.PassThrough, + Console.WriteLine("{0}+ {1}+ {2}+ {3}+ {4}+ {5}", entry.Key, data.PassThrough, data.TotalOutputColumns, data.TotalInputColumns, data.TotalSchemaOutputs, data.TotalSchemaInputs); } diff --git a/ScopeProgramAnalysis/ScopeAnalysisBulkScripts/BulkAnalysis.cs b/ScopeProgramAnalysis/ScopeAnalysisBulkScripts/BulkAnalysis.cs index 5e1af46..9bb3803 100644 --- a/ScopeProgramAnalysis/ScopeAnalysisBulkScripts/BulkAnalysis.cs +++ b/ScopeProgramAnalysis/ScopeAnalysisBulkScripts/BulkAnalysis.cs @@ -19,17 +19,18 @@ namespace ScopeAnalysisBulkScripts static void Main(string[] args) { - var doOnlyPassthrough = true; + var doOnlyPassthrough = false; var doAnalysis = !doOnlyPassthrough; - 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 analysisClient = @"C:\Users\Diego\Source\Repos\rudder\AnalysisClient\bin\Debug\AnalysisClient.exe"; + var outputAnalyzer = @"C:\Users\Diego\Source\Repos\rudder\CompareAnalysisOutput\Compare\bin\Debug\Compare.exe"; - var inputFolder = @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug"; - if(doOnlyPassthrough) + var inputFolder = @"C:\Temp\Scope\First100JobsFromMadan"; + // @"\\madanm2\parasail2\TFS\parasail\ScopeSurvey\AutoDownloader\bin\Debug"; + if (doOnlyPassthrough) { - inputFolder = @"C:\temp\Madam"; + inputFolder = @"C:\temp\Scope\out"; } //inputFolder = @"\\research\root\public\mbarnett\Parasail\First100JobsFromMadan"; //var inputFolder = @"D:\Madam3"; @@ -37,7 +38,7 @@ namespace ScopeAnalysisBulkScripts var inputList = @"C:\Temp\Zvo\inputDlls.txt"; //var inputList = @"C:\Temp\Zvo\sampleDlls.txt"; - var outputFolder = @"C:\Temp\Madam"; + var outputFolder = @"C:\Temp\Scope\out"; //outputFolder = @"C:\Temp\Mike100"; //outputFolder = @"C:\temp\ZvoList"; diff --git a/ScopeProgramAnalysis/Scripts/process.py b/ScopeProgramAnalysis/Scripts/process.py index b7644ee..0367f28 100644 --- a/ScopeProgramAnalysis/Scripts/process.py +++ b/ScopeProgramAnalysis/Scripts/process.py @@ -33,7 +33,7 @@ for f in onlyfiles: break lines = file.readlines()[0:] - for row in csv.reader(lines): + for row in csv.reader(lines, delimiter='+'): if row: if(len(row)>2): totalBench+=1 @@ -42,6 +42,7 @@ for f in onlyfiles: and row[0].find('ScopeReducer_')==-1 and row[0].find('ScopeRuntime.')==-1): #print(row[0]) totalBenchWithinfo+=1 + print(row) p = int(row[1]) t = int(row[2]) if(row[2]>=0 and row[3]>=0): From ea4236dc3aa86b8b3adcaacc0d3e704dd874519f Mon Sep 17 00:00:00 2001 From: garbervetsky Date: Tue, 11 Jul 2017 21:29:46 -0700 Subject: [PATCH 2/2] Fix scripts to compute stats --- .../Scripts/clasesAnalyzed.py | 29 +++++++++---------- ScopeProgramAnalysis/Scripts/process.py | 2 +- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/ScopeProgramAnalysis/Scripts/clasesAnalyzed.py b/ScopeProgramAnalysis/Scripts/clasesAnalyzed.py index 7be4a42..c8ccc88 100644 --- a/ScopeProgramAnalysis/Scripts/clasesAnalyzed.py +++ b/ScopeProgramAnalysis/Scripts/clasesAnalyzed.py @@ -10,24 +10,21 @@ totalFiles = 0 for f in onlyfiles: with open(f) as file: totalFiles+=1 - while True: - line = file.readline() - if not line: break - if '\"id\": \"Summary\"' in line: - lines = file.readlines()[1:] - for line in lines: - if '\"id\"' in line: - if '\"id\": \"Summary\"' in line: - break + #print(file) + line = file.readline() + while line: + if '\"id\"' in line: + if '\"id\": \"Summary\"' not in line: + if '\"id\": \"SingleColumn\"' not in line: if(line.find('ScopeFilterTransformer_')==-1 and line.find('ScopeTransformer_')==-1 \ - and line.find('ScopeGrouper_')==-1 and line.find('ScopeProcessorCrossApplyExpressionWrapper')==-1 \ - and line.find('ScopeReducer_')==-1 and line.find('ScopeRuntime.')==-1) \ - and line.find('\"SingleColumn\"')==-1: + and line.find('ScopeGrouper_')==-1 and line.find('ScopeProcessorCrossApplyExpressionWrapper')==-1 \ + and line.find('ScopeReducer_')==-1 and line.find('ScopeRuntime.')==-1) \ + and line.find('\"SingleColumn\"')==-1 \ + and line.find("|Process")!=-1: totalBench+=1 - print(line) - break - #else: - + #print(line) + line = file.readline() + diff --git a/ScopeProgramAnalysis/Scripts/process.py b/ScopeProgramAnalysis/Scripts/process.py index 0367f28..e0cbe60 100644 --- a/ScopeProgramAnalysis/Scripts/process.py +++ b/ScopeProgramAnalysis/Scripts/process.py @@ -42,7 +42,7 @@ for f in onlyfiles: and row[0].find('ScopeReducer_')==-1 and row[0].find('ScopeRuntime.')==-1): #print(row[0]) totalBenchWithinfo+=1 - print(row) + #print(row[0]) p = int(row[1]) t = int(row[2]) if(row[2]>=0 and row[3]>=0):