You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/workers/observability/dev-tools/cpu-usage.mdx
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,11 @@ Measuring execution time of specific functions in production can be difficult be
14
14
[only increment timers on I/O](/workers/reference/security-model/#step-1-disallow-timers-and-multi-threading)
15
15
for security purposes. However, measuring CPU execution times is possible in local development with DevTools.
16
16
17
+
When using DevTools to monitor CPU usage, it may be difficult to replicate specific behavior you are
18
+
seeing in production. To mimic production behavior, make sure the requests you send to the local Worker
19
+
are similar to requests in production. This might mean sending a large volume of requests, making requests
20
+
to specific routes, or using production-like data with the [--remote flag](/workers/testing/local-development/#develop-using-remote-resources-and-bindings).
Copy file name to clipboardExpand all lines: src/content/docs/workers/observability/dev-tools/memory-usage.mdx
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,11 @@ You can profile memory usage with snapshots in DevTools. Memory snapshots let yo
13
13
memory usage, see how much memory is allocated to different data types, and get details on specific
14
14
objects in memory.
15
15
16
+
When using DevTools to profile memory, it may be difficult to replicate specific behavior you are
17
+
seeing in production. To mimic production behavior, make sure the requests you send to the local Worker
18
+
are similar to requests in production. This might mean sending a large volume of requests, making requests
19
+
to specific routes, or using production-like data with the [--remote flag](/workers/testing/local-development/#develop-using-remote-resources-and-bindings).
0 commit comments