code: async function encryptBeforeDecrypt({alice, bob}, messageCount) {
    const numbers = numbersInArray(messageCount);
  
    // Encryption
    process.stdout.write(`Measuring encryption time for "${messageCount}" messages ... `);
    let startTime = process.hrtime();
    const encryptedMessages = await Promise.all(
      numbers.map(value => alice.encrypt(createSessionId(bob), `This is a long message with number ${value.toString()}`))
    );
    let stopTime = getTimeInSeconds(startTime);
    process.stdout.write('Done.\n');
  
    console.info(`Execution time: ${stopTime} seconds.\n`);
  
    // Decryption
    process.stdout.write(`Measuring decryption time for "${messageCount}" messages ... `);
    startTime = process.hrtime();
    await Promise.all(
      encryptedMessages.map(async encryptedMessage => await bob.decrypt(createSessionId(alice), encryptedMessage))
    );
    stopTime = getTimeInSeconds(startTime);
    process.stdout.write('Done.\n');
  
    console.info(`Execution time: ${stopTime} seconds.\n`);
  }
docs: Runs the test scenario and measures times.