fix: integer arithmetic for timestamps, emit elapsed_since_start_ns as string#28
Merged
fix: integer arithmetic for timestamps, emit elapsed_since_start_ns as string#28
Conversation
…d_since_start_ns as string - Replace `* 1e3` with `* 1000` and `* 1e-3` with `/ 1000` for microsecond-to-nanosecond and microsecond-to-millisecond conversions. The floating-point literals promoted uint64_t to double and back, which is unnecessary for integer-to-integer conversion. - Emit elapsed_since_start_ns as a string via napi_create_string_utf8 instead of napi_create_int64. The TypeScript type declares this field as string, and nanosecond values can exceed Number.MAX_SAFE_INTEGER for long profiles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
timfish
approved these changes
Apr 30, 2026
mydea
added a commit
to getsentry/sentry-javascript
that referenced
this pull request
May 8, 2026
…4.0 (#20720) Bumps this from 2.2.0 to 2.4.0, including the following changes: ## v2.4.0 * feat: Add Node 26 support (getsentry/sentry-javascript-profiling-node-binaries#32) ## v2.3.0 * fix: Memory leaks, integer truncation, UB, and double-stop (getsentry/sentry-javascript-profiling-node-binaries#26) * fix: Integer arithmetic for timestamps, emit elapsed_since_start_ns as string (getsentry/sentry-javascript-profiling-node-binaries#28) * fix: Dead member, capacity checks, insert perf, napi_env by value (getsentry/sentry-javascript-profiling-node-binaries#27) * chore: Replace execSync with execFileSync to prevent command injection (getsentry/sentry-javascript-profiling-node-binaries#23) * chore: Pin GitHub Actions to full-length commit SHAs (getsentry/sentry-javascript-profiling-node-binaries#24) * ci: Build Linux in container for wider glibc support (getsentry/sentry-javascript-profiling-node-binaries#16)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix integer arithmetic and align ts type