-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
test: add fast api tests for getLibuvNow() #55905
base: main
Are you sure you want to change the base?
Conversation
@targos I'm getting a runtime error with this. Am I missing something?
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #55905 +/- ##
==========================================
- Coverage 88.49% 87.97% -0.53%
==========================================
Files 653 656 +3
Lines 187735 188383 +648
Branches 36181 35974 -207
==========================================
- Hits 166141 165723 -418
- Misses 14819 15830 +1011
- Partials 6775 6830 +55
|
I think it's because you can't directly optimize a native function. You need to wrap it in a JS function and optimize that. |
0c49cfb
to
4b7036b
Compare
4b7036b
to
d30d54f
Compare
Thanks. I updated the pull-request and you're indeed correct. It fixed the crash. |
return binding.getLibuvNow(); | ||
} | ||
function testFastPaths() { | ||
assert(binding.getLibuvNow() < 0x3ffffff); |
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.
This should not call optmized
function?
Adds a V8 fast api test for
binding.getLibuvNow()
function.cc @nodejs/cpp-reviewers