-
Notifications
You must be signed in to change notification settings - Fork 22
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
Trace correct test time #276
Conversation
Observed Issues in the
|
What about this PR? I have another draft patch locally which is related to this patch and has git conflict with this patch. Kindly ping for review. Thanks a lot. |
@@ -551,16 +551,16 @@ pub fn run_test( | |||
|
|||
let printed = Arc::clone(&printed); | |||
handlers.push(async move { | |||
let mut result = trace::scope("test", || async { | |||
let mut result = trace::async_scope( | |||
"test", |
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.
we could sepecify which test is running
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.
Several names which are passed to trace::scope
need to be adjusted/polished. It is good to fix them in another patch.
Currently, when using the command
moon test --trace
to record the test time, the output intrace.json
is not right. The duration is always0
(shown below).It is because the code in entry.rs just records the time to construct a
Future
instead of the time to run the test.This PR relies on moonbitlang/n2#2 and can't be integrated before it. After merging these two PRs, the output should be right (as shown below).
Related Issues
Type of Pull Request
Does this PR change existing behavior?
Does this PR introduce new dependencies?
Checklist: