-
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
Add stat for clock runtime #121
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work @djKooks! i have just a small pair of nitpicks about variable names. otherwise, this looks great 🙂
lib/src/execute.rs
Outdated
@@ -228,7 +229,7 @@ impl ExecuteCtx { | |||
remote: IpAddr, | |||
) -> Result<(), ExecutionError> { | |||
info!("handling request {} {}", req.method(), req.uri()); | |||
|
|||
let now = Instant::now(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about renaming this variable ever so slightly, to something like...
let now = Instant::now(); | |
let start_timestamp = Instant::now(); |
lib/src/execute.rs
Outdated
@@ -276,11 +277,15 @@ impl ExecuteCtx { | |||
.expect("`memory` is exported") | |||
.size(&store); | |||
|
|||
let distant = Instant::now().duration_since(now); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...and similarly, a slight name tweak
let distant = Instant::now().duration_since(now); | |
let request_duration = Instant::now().duration_since(start_timestamp); |
lib/src/execute.rs
Outdated
info!( | ||
"request completed using {} of WebAssembly heap", | ||
bytesize::ByteSize::kib(heap_pages as u64 * 64) | ||
); | ||
|
||
info!("request completed in {:?}", distant); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same rename as above, just applying it here so you can fix this with the click of a mouse 🖱️
info!("request completed in {:?}", distant); | |
info!("request completed in {:?}", request_duration); |
@cratelyn updated 🙏 |
this looks like it's almost ready to go @djKooks! there's currently a hiccup in CI here that was addressed in #123. if you rebase this branch on the current |
@cratelyn got it. Updated~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you so much @djKooks! this looks great 🙂
Following #76
(please ignore branch/commit name...)