Category: Docker

Using child_process to run code inside a Cloud Function seems to produce significant latency spikes around require statements. The whole idea of Asserted is that it allows you to run custom test code against your application. At the time I started building it, I figured the fastest and easiest way to do that was using GCP Cloud Functions.

So it wasn’t the code exactly, and it wasn’t the API I was calling from inside that code.

I was surprised to see that the delay wasn’t happening within the bulk of the user code, it was happening between the exec starting and when the require statements finished.

Related Articles