MA3CIN opened issue #10519:
Feature
I believe wasmtime could benefit from outputting statistics regarding running instances. I'd ideally love to see: CPU, MEMORY usage and start up time (for cold starts)
Benefit
I believe outputting these stats will make a direct comparison to containers easier, thus making wasmtime adoption more appealing by highlighting its strong sides
Implementation
WasmEdge CLI has something simliar (not exactly all of the stats, but its a start) with the CLI option "--enable-all-statistics" (https://wasmedge.org/docs/start/build-and-run/cli/)
Alternatives
I know that wasmtime supports linux profiling with perf, but i was not able to measure the 3 metrics mentioned above using perf
alexcrichton commented on issue #10519:
Thanks for the report! These sorts of metrics wouldn't be too bad to measure, for example memory consumed by the wasm module would be pretty easy to measure. Other metrics though like time taken, instructions executed, or fuel, can come at a cost of runtime in wasm itself.
These sorts of features can of course always be built for embeddings of Wasmtime and so this is mostly a question of what the CLI does. I think it'd be reasonable to experiment with some flags to the CLI and test this out, and PRs are definitely welcome in this area!
Last updated: Apr 16 2025 at 17:03 UTC