This repo contains a load test that uses a local process to make api requests to a cloudflare worker. That worker makes read/write requests to macrometa using both the global URL, and specific region URLs.
The steps below will explain how to run the test.
- Create a file called
secrets.jsinside thesrcdirectory that exports a macrometa api key.exports.API_KEY = <key> - Run
npm install && npm run build - Copy
shim.mjsfrom thesrcdirectory into the newly createddistdir - Run
wrangler publish*Note: You will need to have wrangler setup, logged in and authenticated for this to work
You can run the load testing script by doing node loadTest.jms.
This will hit the published cloudflare worker.
If you wish to run entirely on local, you can run wrangler dev in a separate tab,
and use the local url const base = 'http://127.0.0.1:8787' in loadTest.mjs
instead of the cloudflare worker url.