https://github.com/ehacke/cloud-function-latency-spikes
Using child_process to run code inside a Cloud Function seems to produce significant latency spikes around require statements
https://github.com/ehacke/cloud-function-latency-spikes
cloud-functions investigation latency-spikes nodejs
Last synced: 6 months ago
JSON representation
Using child_process to run code inside a Cloud Function seems to produce significant latency spikes around require statements
- Host: GitHub
- URL: https://github.com/ehacke/cloud-function-latency-spikes
- Owner: ehacke
- License: mit
- Created: 2020-07-07T18:27:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T19:57:02.000Z (over 2 years ago)
- Last Synced: 2024-10-12T00:37:20.920Z (12 months ago)
- Topics: cloud-functions, investigation, latency-spikes, nodejs
- Language: JavaScript
- Homepage: https://asserted.io/posts/spikes-in-cloud-function-require-latency
- Size: 732 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cloud-function-latency-spikes
Using child_process to run code inside a Cloud Function seems to produce significant latency spikes around require statements.## Details
Check out this blog post for [details and stats](https://asserted.io/posts/spikes-in-cloud-function-require-latency).
## To Reproduce
- Clone the repo
- Run `npm install`
- Make sure you have the [gcloud SDK installed](https://cloud.google.com/sdk/docs/downloads-interactive)
- Run `npm run build` to build the auto-generated libraries this will use during testing
- Run `npm run deploy:function` to push the code as a Cloud Function to your default project
- Create a `.env` file in the repo with `CLOUD_FUNCTION_URL=` whatever the url of the function is that you just created
- Run `npm run run:function` to run the test against the function and gather results