-
Notifications
You must be signed in to change notification settings - Fork 288
Open
Description
Somewhat tangential to #2933.
It would be great to have a flag (or potentially a plugin) to Spin, which will output three metrics from running a Spin app locally:
- CPU Times spent (min/avg/max)
- Execution time (min/avg/max)
- Memory usage (min/avg/max)
With min/avg/max being across the requests handled while Spin was running a given application.
Further improvement being splitting by component, while maintaining total.
I'm imagining something like:
> spin up --enable-spinfo
Logging component stdio to ".spin/logs/"
Serving http://127.0.0.1:3000
Available Routes:
demo-ts: http://127.0.0.1:3000 (wildcard)
^C⏎
-- SpInfo
Total:
# of invocations: 200
CPU Times spent (min/avg/max) 1ms/2ms/5ms
Execution time (min/avg/max) 10ms/20ms/30ms
Memory usage (min/avg/max) 5MB/10MB/10MB
Component 1:
# of invocations: 200
CPU Times spent (min/avg/max) 1ms/2ms/5ms
Execution time (min/avg/max) 10ms/20ms/30ms
Memory usage (min/avg/max) 5MB/5MB/5MB
Component 2:
# of invocations: 100
CPU Times spent (min/avg/max) 0ms/1ms/2ms
Execution time (min/avg/max) 5ms/10ms/20ms
Memory usage (min/avg/max) 5MB/5MB/5MB
>
gdamjan
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Backlog