@@ -897,14 +897,6 @@ class Benchmark {
897897 return tags ;
898898 }
899899
900- < << << << HEAD
901- get name ( ) { return this . plan . name ; }
902- get files ( ) { return this . plan . files ; }
903- || || || | parent of 1 dbb861 ( Improve Benchmark constructor and instance variables ( #255 ) )
904- get name ( ) { return this . plan . name ; }
905- get files ( ) { return this . plan . files ; }
906- get preloadFiles ( ) { return Object . values ( this . plan . preload ?? { } ) ; }
907- = === ===
908900 _processIterationCount ( iterations ) {
909901 if ( this . name in JetStreamParams . testIterationCountMap )
910902 return JetStreamParams . testIterationCountMap [ this . name ] ;
@@ -924,7 +916,6 @@ class Benchmark {
924916 return worstCaseCount ;
925917 return defaultWorstCaseCount ;
926918 }
927- > >>> >>> 1 dbb861 ( Improve Benchmark constructor and instance variables ( #255 ) )
928919
929920 get isDone ( ) {
930921 return this . _state == BenchmarkState . DONE || this . _state == BenchmarkState . ERROR ;
@@ -1093,16 +1084,8 @@ class Benchmark {
10931084 scripts . add ( prerunCode ) ;
10941085
10951086 if ( ! isInBrowser ) {
1096- < << << << HEAD
1097- console . assert ( this . scripts && this . scripts . length === this . plan . files . length ) ;
1098- for ( const text of this . scripts )
1099- || || || | parent of 1 dbb861 ( Improve Benchmark constructor and instance variables ( #255 ) )
1100- console . assert ( this . scripts && this . scripts . length === this . files . length ) ;
1101- for ( const text of this . scripts )
1102- = === ===
11031087 console . assert ( this . _scripts && this . _scripts . length === this . files . length ) ;
11041088 for ( const text of this . _scripts )
1105- > >>> >>> 1 dbb861 ( Improve Benchmark constructor and instance variables ( #255 ) )
11061089 scripts . add ( text ) ;
11071090 } else {
11081091 const cache = browserFileLoader . blobDataCache ;
@@ -1157,32 +1140,13 @@ class Benchmark {
11571140 }
11581141
11591142
1160- < << << << HEAD
11611143 updateCounter ( ) {
11621144 const counter = JetStream . counter ;
11631145 ++ counter . loadedResources ;
11641146 const statusElement = document . getElementById ( "status" ) ;
11651147 statusElement . innerHTML = `Loading ${ counter . loadedResources } of ${ counter . totalResources } ...` ;
1166- || || || | parent of 1 dbb861 ( Improve Benchmark constructor and instance variables ( #255 ) )
1167- async prefetchResourcesForBrowser ( ) {
1168- console . assert ( isInBrowser ) ;
1169- const promises = this . files . map ( ( file ) => browserFileLoader . prefetchResourceFile ( file ) ) ;
1170- for ( const [ name , resource ] of Object . entries ( this . plan . preload ?? { } ) ) {
1171- promises . push ( this . prefetchResourcePreload ( name , resource ) ) ;
1172- }
1173- await Promise . all ( promises ) ;
1174- = === ===
1175- async prefetchResourcesForBrowser ( ) {
1176- console . assert ( isInBrowser ) ;
1177- const promises = this . files . map ( ( file ) => browserFileLoader . prefetchResourceFile ( file ) ) ;
1178- for ( const [ name , resource ] of this . preloadEntries ) {
1179- promises . push ( this . prefetchResourcePreload ( name , resource ) ) ;
1180- }
1181- await Promise . all ( promises ) ;
1182- > >>> >>> 1 dbb861 ( Improve Benchmark constructor and instance variables ( #255 ) )
11831148 }
11841149
1185- < << << << HEAD
11861150 prefetchResourcesForBrowser ( counter ) {
11871151 console . assert ( isInBrowser ) ;
11881152
@@ -1234,31 +1198,14 @@ class Benchmark {
12341198 }
12351199 }
12361200 return ! counter . failedPreloadResources && counter . loadedResources == counter . totalResources ;
1237- || || || | parent of 1 dbb861 ( Improve Benchmark constructor and instance variables ( #255 ) )
1238- async prefetchResourcePreload ( name , resource ) {
1239- const preloadData = await browserFileLoader . prefetchResourcePreload ( name , resource ) ;
1240- this . preloads . push ( preloadData ) ;
1241- = === ===
1242- async prefetchResourcePreload ( name , resource ) {
1243- const preloadData = await browserFileLoader . prefetchResourcePreload ( name , resource ) ;
1244- this . _preloadBlobData . push ( preloadData ) ;
1245- > >>> >>> 1 dbb861 ( Improve Benchmark constructor and instance variables ( #255 ) )
12461201 }
12471202
12481203 prefetchResourcesForShell ( ) {
12491204 // FIXME: move to ShellFileLoader.
12501205 console . assert ( ! isInBrowser ) ;
12511206
1252- < << << << HEAD
1253- console . assert ( this . scripts === null , "This initialization should be called only once." ) ;
1254- this . scripts = this . plan . files . map ( file => shellFileLoader . load ( file ) ) ;
1255- || || || | parent of 1 dbb861 ( Improve Benchmark constructor and instance variables ( #255 ) )
1256- console . assert ( this . scripts === null , "This initialization should be called only once." ) ;
1257- this . scripts = this . files . map ( file => shellFileLoader . load ( file ) ) ;
1258- = === ===
12591207 console . assert ( this . _scripts === null , "This initialization should be called only once." ) ;
12601208 this . _scripts = this . files . map ( file => shellFileLoader . load ( file ) ) ;
1261- > >>> >>> 1 dbb861 ( Improve Benchmark constructor and instance variables ( #255 ) )
12621209
12631210 console . assert ( this . _preloadBlobData . length === 0 , "This initialization should be called only once." ) ;
12641211 this . _shellPrefetchedResources = Object . create ( null ) ;
@@ -1392,25 +1339,6 @@ class Benchmark {
13921339 }
13931340 plotContainer . innerHTML = `<svg width="${ width } px" height="${ height } px">${ circlesSVG } </svg>` ;
13941341 }
1395- < << << << HEAD
1396- || || || | parent of 1 dbb861 ( Improve Benchmark constructor and instance variables ( #255 ) )
1397-
1398- tearDown ( ) {
1399- if ( isInBrowser ) {
1400- browserFileLoader . free ( this . files ) ;
1401- browserFileLoader . free ( this . preloadFiles ) ;
1402- }
1403- }
1404- = === ===
1405-
1406- tearDown ( ) {
1407- if ( isInBrowser ) {
1408- browserFileLoader . free ( this . files ) ;
1409- const preloadFiles = this . preloadEntries . map ( ( [ _ , file ] ) => file ) ;
1410- browserFileLoader . free ( preloadFiles ) ;
1411- }
1412- }
1413- > >>> >>> 1 dbb861 ( Improve Benchmark constructor and instance variables ( #255 ) )
14141342} ;
14151343
14161344class GroupedBenchmark extends Benchmark {
0 commit comments