-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instrument and emit stats on program wall clock duration #76
Comments
cc: @djKooks, i was guessing based on your activity in #118 and #63 that you were looking for good starter issues in this repository. this issue might be a good one to pick up, if you are interested! you can see where we currently log how much heap space was used by a Wasm program, here: https://github.com/fastly/Viceroy/blob/main/lib/src/execute.rs#L279-L282 we could use feel free to ping me if you have any further questions 🙇♀️ |
@cratelyn great thanks! I'll look on it 🙏 |
@cratelyn sorry, I'm in middle of research, so want to ask some basic question. It should be the task to emit the CPU/RAM usage. So before going on, could you let me know how can I visualize (through cli) the stats which is currently being supported? |
@cratelyn for now I've saw
by running So the purpose for task is to display RAM usage, CPU time in this log? |
hi @djKooks, thank you for your patience, it looks like you found the right test to run. for reference, you can also use ; cargo test -p viceroy request_works -- --nocapture that logs at the
#78 and #79 cover RAM and CPU time, respectively. this issue is specifically focused on showing how long it took for the Wasm binary to finish running. RAM usage or CPU time telemetry can be added separately from this, and showing the total wall-clock time will be a wonderful addition. using the logs you showed above as a starting point, i imagine we would want something like...
in terms of code, the logic for this will be shaped like... let start_time = Instant::now();
// run the Wasm binary
let wall_clock_time = Instance::now().duration_since(start_time);
tracing::info("WebAssembly program completed in {}ms", wall_clock_time.as_millis()); i hope that's helpful, the link in my comment above contains a link to where we'll want to add this logic. finally, thank you so much for taking this on @djKooks 💌 |
Hello @cratelyn . Thanks for the guide.
(will it be better to make |
@cratelyn please close this if it's okay. Also if there's some issue in minor priority, please suggest 🙏 |
of course! i just tagged you over in #23, which may be a good issue to tackle next. 💟 with that, i'm going to close this issue! |
Fastly's UI provides stats on the total wall clock of a Compute@Edge program running in production. Viceroy should emit information about the wall clock duration of a single instance execution, so that users can reason about the behavior of their program in production.
The text was updated successfully, but these errors were encountered: