@@ -6909,14 +6909,19 @@ describe('Floccus', function() {
69096909 describe ( `${ stringifyAccountData ( ACCOUNT_DATA ) } benchmark ${ ACCOUNT_DATA . serverRoot ? 'subfolder' : 'root' } ` , function ( ) {
69106910 context ( 'with two clients' , function ( ) {
69116911 this . timeout ( 120 * 60000 ) // timeout after 2h
6912+ const BENCHMARK_SIZE = 1000
69126913 let account1 , account2 , RUN_INTERRUPTS = false
69136914 let timeouts = [ ]
69146915 let i = 0
69156916 let timer = null
69166917 const setInterrupt = ( ) => {
69176918 if ( ! timeouts . length ) {
69186919 timeouts = new Array ( 1000 ) . fill ( 0 ) . map ( ( _ , index ) =>
6919- ACCOUNT_DATA . type === 'nextcloud-bookmarks' ? random . int ( 50000 , 150000 ) : random . int ( 200 , Math . round ( 4000 + ( 20000 - 4000 ) * ( index % 20 ) / 20 ) )
6920+ ACCOUNT_DATA . type === 'nextcloud-bookmarks'
6921+ // Produce random numbers of timeouts between 30s and increasing numbers between 30s and 180s (increasing for streches of 20, then going back to 30s)
6922+ ? random . int ( 30000 , Math . round ( 30000 + ( 180000 - 30000 ) * ( index % 20 ) / 20 ) )
6923+ // Produce random numbers of timeouts between 4s and increasing numbers between 4s and 20s (increasing for streches of 20, then going back to 4s)
6924+ : random . int ( 200 , Math . round ( 4000 + ( 20000 - 4000 ) * ( index % 20 ) / 20 ) )
69206925 )
69216926 }
69226927 const timeout = timeouts [ ( i ++ ) % 1000 ]
@@ -7060,7 +7065,7 @@ describe('Floccus', function() {
70607065 }
70617066 }
70627067
7063- await createTree ( localRoot , 0 , 1000 )
7068+ await createTree ( localRoot , 0 , BENCHMARK_SIZE )
70647069
70657070 const tree1Initial = await account1 . localTree . getBookmarksTree ( true )
70667071 await account1 . sync ( )
@@ -7211,7 +7216,7 @@ describe('Floccus', function() {
72117216 }
72127217 }
72137218
7214- await createTree ( localRoot , 0 , 1000 )
7219+ await createTree ( localRoot , 0 , BENCHMARK_SIZE )
72157220
72167221 let tree1Initial = await account1 . localTree . getBookmarksTree ( true )
72177222 await account1 . sync ( )
@@ -7442,7 +7447,7 @@ describe('Floccus', function() {
74427447 }
74437448 }
74447449
7445- await createTree ( localRoot , 0 , 1000 )
7450+ await createTree ( localRoot , 0 , BENCHMARK_SIZE )
74467451
74477452 let tree1Initial = await account1 . localTree . getBookmarksTree ( true )
74487453 await account1 . sync ( )
@@ -7684,7 +7689,7 @@ describe('Floccus', function() {
76847689 }
76857690 }
76867691
7687- await createTree ( localRoot , 0 , 1000 )
7692+ await createTree ( localRoot , 0 , BENCHMARK_SIZE )
76887693
76897694 let tree1Initial = await account1 . localTree . getBookmarksTree ( true )
76907695 await account1 . sync ( )
@@ -7922,7 +7927,7 @@ describe('Floccus', function() {
79227927 }
79237928 }
79247929
7925- await createTree ( localRoot , 0 , 1000 )
7930+ await createTree ( localRoot , 0 , BENCHMARK_SIZE )
79267931
79277932 let tree1Initial = await account1 . localTree . getBookmarksTree ( true )
79287933 await syncAccountWithInterrupts ( account1 )
@@ -8179,7 +8184,7 @@ describe('Floccus', function() {
81798184 }
81808185 }
81818186
8182- await createTree ( localRoot , 0 , 1000 )
8187+ await createTree ( localRoot , 0 , BENCHMARK_SIZE )
81838188
81848189 let tree1Initial = await account1 . localTree . getBookmarksTree ( true )
81858190 await account1 . sync ( )
@@ -8423,7 +8428,7 @@ describe('Floccus', function() {
84238428 }
84248429 }
84258430
8426- await createTree ( localRoot , 0 , 1000 )
8431+ await createTree ( localRoot , 0 , BENCHMARK_SIZE )
84278432
84288433 let tree1Initial = await account1 . localTree . getBookmarksTree ( true )
84298434 await account1 . sync ( )
0 commit comments