function bufferGenerator(amount,length) {
  /** @type {Buffer[]} */
  const data = []
  console.log(`Generate ${amount} file buffers ${length} length`)
  console.log(`It takes some time`)
  const timer = Timer()
  for(let i=0;i<amount;i++) {
    console.log(`file ${i}`)
    data.push(getBuffer(length))
  }
  const datagenTime = timer()
  console.log(`Generated in ${datagenTime} ms`)
  return data
}
/**
 * Generate a lot of random data
 * @func bufferGenerator
 * @param {number} amount Number of files
 * @param {number} length Length of each file
 * @returns Random buffers
 */
Generate a lot of random data
@func bufferGenerator
@param {number} amount Number of files
@param {number} length Length of each file
@returns Random buffers
Generate a lot of random data @func bufferGenerator @param { number } amount Number of files @param { number } length Length of each file @returns Random buffers
function bufferGenerator(amount,length) {
  const data = []
  console.log(`Generate ${amount} file buffers ${length} length`)
  console.log(`It takes some time`)
  const timer = Timer()
  for(let i=0;i<amount;i++) {
    console.log(`file ${i}`)
    data.push(getBuffer(length))
  }
  const datagenTime = timer()
  console.log(`Generated in ${datagenTime} ms`)
  return data
}
function bufferGenerator ( amount , length ) { const data = [ ] console . log ( ` ${ amount } ${ length } ` ) console . log ( ` ` ) const timer = Timer ( ) for ( let i = 0 ; i < amount ; i ++ ) { console . log ( ` ${ i } ` ) data . push ( getBuffer ( length ) ) } const datagenTime = timer ( ) console . log ( ` ${ datagenTime } ` ) return data }
Generate a lot of random data
 @func bufferGenerator
 @param {number} amount Number of files
 @param {number} length Length of each file
 @returns Random buffers
Generate a lot of random data @func bufferGenerator @param { number } amount Number of files @param { number } length Length of each file @returns Random buffers
/** @type {Buffer[]} */