Skip to content

Simple Puppeteer script to try to measure DDEV performance

License

Notifications You must be signed in to change notification settings

ddev/ddev-puppeteer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ddev-puppeteer

Simple Puppeteer script for measuring DDEV performance.

This tries to use a DDEV Drupal 10 project as a measure of performance using a web install of the demo_umami profile.

  • To use this, you need Node.js, npm init && npm i puppeteer async.
  • The project named in ddev-puppeteer.js should be a standard Drupal 10 install as per the DDEV Drupal 10 quickstart
  • Edit site and sitedir in ddev-puppeteer.js.
  • Set up the project with Mutagen or Colima or whatever permutation you like.
  • The project should already be running.
  • Run the test with node ddev-puppeteer.js.

Notes

  • This is using the Drupal demo_umami profile, which takes longer than standard.
  • The script resets php-fpm at the beginning to make sure we start without a PHP OPcache. This may or may not be fair.
  • To see what’s happening in the install you can change puppeteer.launch({headless: true}) to puppeteer.launch({headless: false}).
  • The Drush install is ddev mysql -e "DROP DATABASE IF EXISTS db; CREATE DATABASE db;" && ddev exec killall -USR2 php-fpm && rm -rf web/sites/default/files/* && ddev mutagen sync && time ddev drush si demo_umami -y
  • Links:

Thanks

Thanks so much to @froboy and his inspiring measurements in https://gist.github.com/froboy/f237bf62cfde5350c0849c6e9aab0c71