-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Erik/timerify #12334
base: main
Are you sure you want to change the base?
Erik/timerify #12334
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.
overall alright. most of my worry is in the messy binding for creating the JSMap, and then a handful of simple to fix zig nitpicks. nice work on HDRHistogram.
also if youre writing documentation comments in zig code, that can use ///
, ref
bucket_count: u64, | ||
counts: []u64, | ||
|
||
const This = @This(); |
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.
nitpick: this This
is kind of silly to have. you can just refer to HDRHistogram
, and in init you can use .{
instead of This{
src/bun.js/node/hdr_histogram.zig
Outdated
.bucket_count = bucket_count, | ||
.counts = counts, | ||
.total_count = 0, | ||
.min = 9223372036854776000, |
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.
should this start as highest_trackable_value
? or std.math.maxInt(u64)
?
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.
std.math.maxInt is probably better choice, whole point is to guarantee it gets overridden on next record
README.md
Outdated
<a href="https://bun.sh"><img src="https://user-images.githubusercontent.com/709451/182802334-d9c42afe-f35d-4a7b-86ea-9985f73f20c3.png" alt="Logo" height=170></a> | ||
</p> | ||
<h1 align="center">Bun</h1> | ||
# HdrHistogram_c |
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.
lol the readme got nuked. please revert
Still need to
|
❌ @erik-dunteman, your commit has failing tests :( 💻 2 failing tests Darwin x64 baseline
💻 1 failing tests Darwin x64
🪟💻 5 failing tests Windows x64 baseline
🪟💻 5 failing tests Windows x64
|
Working on PerformanceObserver stuff now, but can make that a separate PR. This PR should be ready to go whenever CI passes and code review approved @Jarred-Sumner @paperdave |
These are new test failures |
What does this PR do?
Note that timerify records durations in two ways, through a Histogram and through sending events to PerformanceObserver, and this PR only addresses Histogram use.
The specific issue #9271 should remain open until PerformanceObserver is implemented.
How did you verify your code works?
Histogram: added plenty of tests in
hdr_histogram.zig
, all passTimerify: local sanity checks, below:
all behave as expected
"I wrote automated tests", though curious if all zig tests are ran in CI. we'll see.
bun-debug test test-file-name.test
)Zig changes
bun-debug test test-file-name.test
)Types