No, but this seems overly complicated for what I want. What I want is this: ``` const cpuLimit = 20

No, but this seems overly complicated for what I want.

What I want is this:
const cpuLimit = 200;

const worker = c.env.appServiceDispatcher.get(
  c.var.serviceUuid,
  {},
  {
    limits: {
      cpuMs: cpuLimit,
    },
  }
);

const startTime = performance.now();
const response = await worker.fetch(request);
const endTime = performance.now();

const duration = Math.min(Math.floor(endTime - startTime), cpuLimit);


One of obvious ways is to simply return some sort of CF- header indicating stats back to calling worker/dispatcher?

I do not think creating new worker to observe my customers workers execution is viable here.
Was this page helpful?