File tree Expand file tree Collapse file tree 6 files changed +18
-8
lines changed
Expand file tree Collapse file tree 6 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class DataManager {
2222 }
2323
2424 async parseOutput ( buildName , output ) {
25+ logger . verbose ( 'parseOutput' ) ;
2526 const parserTypes = await Promise . all (
2627 Object . keys ( Parsers ) . map ( async ( type ) => {
2728 if ( Parsers [ type ] . canParse ( buildName , output ) ) {
@@ -37,6 +38,7 @@ class DataManager {
3738 const parser = new DefaultParser ( ) ;
3839 results = await parser . parse ( output ) ;
3940 }
41+ logger . verbose ( 'parseOutput done' ) ;
4042 return Object . assign . apply ( { } , results ) ;
4143 }
4244
@@ -219,7 +221,8 @@ class DataManager {
219221 update . buildOutputId = buildOutputId ;
220222 update . hasChildren = false ;
221223 }
222- const result = await testResults . update ( criteria , { $set : update } ) ;
224+ await testResults . update ( criteria , { $set : update } ) ;
225+ logger . verbose ( 'updateBuildWithOutput done' ) ;
223226 }
224227
225228 // create build only if the build does not exist in database
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ class JenkinsInfo {
6969 } ) ;
7070 const size = await logStream . getSize ( ) ;
7171 logger . debug (
72- 'JenkinsInfo: getBuildOutput() is waiting for 5 secs after getSize()'
72+ 'JenkinsInfo: getBuildOutput() is waiting for 1 secs after getSize()'
7373 ) ;
7474 await Promise . delay ( 1 * 1000 ) ;
7575
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class Parser {
1414 / = J A V A V E R S I O N O U T P U T B E G I N = [ \r \n ] + ( [ \s \S ] * ?) [ \r \n ] + .* = J A V A V E R S I O N O U T P U T E N D = / ;
1515 const javaBuildDateRegex =
1616 / \s ( [ 0 - 9 ] { 4 } ) - ? ( 0 [ 1 - 9 ] | 1 [ 0 1 2 ] ) - ? ( 0 [ 1 - 9 ] | [ 1 2 ] [ 0 - 9 ] | 3 [ 0 1 ] ) / ;
17- const sdkResourceRegex = / . * ? S D K _ R E S O U R C E \= ( .* ) [ \r \n ] + / ;
17+ const sdkResourceRegex = / S D K _ R E S O U R C E \= ( .* ) [ \r \n ] + / ;
1818 let curRegexResult = null ;
1919 let javaVersion , jdkDate , sdkResource ;
2020 if ( ( curRegexResult = javaVersionRegex . exec ( output ) ) !== null ) {
@@ -142,7 +142,7 @@ class Parser {
142142 let disabled = 0 ;
143143 // An example of test result summary: "TOTAL: 69 EXECUTED: 64 PASSED: 64 FAILED: 0 DISABLED: 0 SKIPPED: 5\n"
144144 const summaryRegex =
145- / \S * \s * ? T O T A L : \s * ( [ 0 - 9 ] * ) \s * E X E C U T E D : \s * ( [ 0 - 9 ] * ) \s * P A S S E D : \s * ( [ 0 - 9 ] * ) \s * F A I L E D : \s * ( [ 0 - 9 ] * ) \s * D I S A B L E D : \s * ( [ 0 - 9 ] * ) \s * S K I P P E D : \s * ( [ 0 - 9 ] * ) \s * ( \r \n | \r | \n ) / ;
145+ / T O T A L : \s * ( [ 0 - 9 ] * ) \s * E X E C U T E D : \s * ( [ 0 - 9 ] * ) \s * P A S S E D : \s * ( [ 0 - 9 ] * ) \s * F A I L E D : \s * ( [ 0 - 9 ] * ) \s * D I S A B L E D : \s * ( [ 0 - 9 ] * ) \s * S K I P P E D : \s * ( [ 0 - 9 ] * ) \s * ( \r \n | \r | \n ) / ;
146146 if ( ( m = summaryRegex . exec ( output ) ) !== null ) {
147147 total = parseInt ( m [ 1 ] , 10 ) ;
148148 executed = parseInt ( m [ 2 ] , 10 ) ;
Original file line number Diff line number Diff line change 11const Parser = require ( './Parser' ) ;
2- const regexRunningTest = / . * ? R u n n i n g t e s t ( .* ?) \. \. \. \r ? / ;
3- const testSeparator = / . * ? = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = \r ? / ;
4- const regexFinishTime = / ( .* ?) F i n i s h T i m e \: .* E p o c h T i m e \( m s \) \: ( \d + ) .* / ;
5- const regexStartTime = / ( .* ?) S t a r t T i m e \: .* E p o c h T i m e \( m s \) \: ( \d + ) .* / ;
2+ const regexRunningTest = / R u n n i n g t e s t ( .* ?) \. \. \. \r ? / ;
3+ const testSeparator = / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = \r ? / ;
4+ const regexFinishTime = / ^ ( .* ?) F i n i s h T i m e \: .* E p o c h T i m e \( m s \) \: ( \d + ) .* / ;
5+ const regexStartTime = / ^ ( .* ?) S t a r t T i m e \: .* E p o c h T i m e \( m s \) \: ( \d + ) .* / ;
66const TestBenchmarkParser = require ( `./TestBenchmarkParser` ) ;
77const ExternalTestParser = require ( `./ExternalTestParser` ) ;
88
Original file line number Diff line number Diff line change @@ -41,13 +41,16 @@ class TestBenchmarkParser extends Parser {
4141 this . getBenchmarkInfo ( result . testName ) ;
4242 result . benchmarkName = benchmarkName ;
4343 result . benchmarkVariant = benchmarkVariant ;
44+ console . log ( 'parsePerf' , benchmarkName ) ;
4445 result . testData = Utils . parseOutput (
4546 benchmarkParserKey ,
4647 result . testOutput
4748 ) ;
49+ console . log ( 'benchmarkParserKey' , benchmarkParserKey ) ;
4850 }
4951 }
5052 }
53+ console . log ( 'parsePerf done' ) ;
5154 return results ;
5255 }
5356}
Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ class Utils {
3434 // if outerRegex is undefined, all runs should be measured. Parse metrics in every run
3535 // if outerRegex is defined, any runs before outerRegex will be ignored. Parse metrics in warm runs only
3636 if ( curBenchVariant . outerRegex !== undefined ) {
37+ console . log (
38+ 'curBenchVariant.outerRegex' ,
39+ curBenchVariant . outerRegex
40+ ) ;
3741 if (
3842 ( curRegexResult =
3943 curBenchVariant . outerRegex . exec ( testOutput ) ) !== null
You can’t perform that action at this time.
0 commit comments