Net-A-Porter are currently looking at dynamic image resizing service by Mr Porter and The Outnet. This project was to check the performance didn't degrade our customer experience.
Once the application has a bunch of PIDs (Product IDs) it will then make 10 requests to origin and the cdn. Each time it will collect how long the response took, generating an average.
Once complete it will save this data and display the results in terminal.
nvm use
npm install
npm start
Each time you run a performance test it will save a benchmark inside the folder: benchmarks
. If you want to graph an existing benchmark you can:
BENCHMARK_FILENAME=2016-08-11_14-41-13.json npm start
Run the tests only for some of the brands:
npm start mrp nap
Randomize PID list, default hits whats new pid list, this is more likely to be cached within resize service:
RANDOM_PIDS=true npm start
Alter the number of PIDS (Product IDs) - default 100:
NUMBER_OF_PIDS=20 npm start
Alter the number of tests on an image - default 10:
NUMBER_OF_TESTS=20 npm start
Load local PID list:
NAP_LOCAL_PIDS=true npm start
You can string multiple local pid lists together:
NAP_LOCAL_PIDS=true MRP_LOCAL_PIDS=true TON_LOCAL_PIDS=true npm start
If you want to update the lists they need to match the product API PID format:
curl http://lad-api.net-a-porter.com/NAP/GB/20/0/pids?visibility=visible&whatsNew=Now
Then saved in the folder: pids