Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5de4b4d
fix(bun): prevent native addon load crash with runtime-aware loader
SamuelLHuber Feb 10, 2026
5e215be
feat(bun): add compatibility backend for time and heap profiles
SamuelLHuber Feb 10, 2026
fba473c
fix(bun): correct wall profile timing units and restart windows
SamuelLHuber Feb 10, 2026
81fe333
ci: add bun runtime smoke test job
SamuelLHuber Feb 10, 2026
a6f856f
fix(build): use explicit parallel jobs for node-gyp
SamuelLHuber Feb 10, 2026
35a456d
fix(install): build source installs when out/src is missing
SamuelLHuber Feb 10, 2026
1e33f2b
fix(bun): make OOM monitor a no-op and add regression test
SamuelLHuber Feb 10, 2026
711b8ea
fix(install): compile missing TS artifacts on source installs
SamuelLHuber Feb 10, 2026
91ae493
ci: enforce bun smoke as merge and publish gate
SamuelLHuber Feb 10, 2026
15f3833
fix(bun): preserve wall label transitions and cpu metadata
SamuelLHuber Feb 10, 2026
0c7141d
test(bun): smoke-test packed install artifact
SamuelLHuber Feb 10, 2026
c31ad24
fix(bun): make context dedupe bigint-safe and stable
SamuelLHuber Feb 10, 2026
2cafd51
fix(bun): canonicalize nested context signatures for dedupe
SamuelLHuber Feb 10, 2026
8c226c2
fix(packaging): include built addon in git installs
SamuelLHuber Feb 10, 2026
5ed2853
fix(bun): preserve sub-ms context timestamp precision
SamuelLHuber Feb 10, 2026
4a7dc56
fix(heap): make start idempotent for matching params
SamuelLHuber Feb 10, 2026
01c8cb5
fix(bun): make heap start idempotent for equivalent config
SamuelLHuber Feb 10, 2026
dc1c0e8
ci(release): gate publish on bun smoke checks
SamuelLHuber Feb 10, 2026
270bb6b
fix(bun): resolve pprof-format safely in commonjs runtime
SamuelLHuber Feb 10, 2026
5e0f4f4
perf(bun): cache context signatures in timeline normalization
SamuelLHuber Feb 10, 2026
151931e
test(cped): stabilize freelist trim regression under instrumentation
SamuelLHuber Feb 10, 2026
1eb1464
test(cped): stabilize freelist plateau regression under coverage
SamuelLHuber Feb 10, 2026
4db7fb4
ci(bun): run smoke gates on linux and darwin triplets
SamuelLHuber Feb 10, 2026
a7aa1a3
fix(bun): preserve worker thread identity in thread id
SamuelLHuber Feb 10, 2026
333e6c7
fix(loader): fall back to local build artifact when binding resolutio…
SamuelLHuber Feb 10, 2026
d7c88a3
test: stabilize nyc when os.cpus() is empty
SamuelLHuber Feb 10, 2026
31f75e6
fix(runtime): harden bun detection fallback
SamuelLHuber Feb 10, 2026
be0a9fd
fix(bun): preserve cpu-time when filtering short context flips
SamuelLHuber Feb 10, 2026
6c0669c
Track out/src artifacts for git dependency installs
SamuelLHuber Feb 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,29 @@ jobs:
- run: npm install
- run: npm run test:js-valgrind

bun-smoke:
strategy:
fail-fast: false
matrix:
include:
- triplet: linux-x64
runs-on: ubuntu-latest
- triplet: linux-arm64
runs-on: ubuntu-24.04-arm
- triplet: darwin-arm64
runs-on: macos-14
runs-on: ${{ matrix.runs-on }}
name: bun-smoke-${{ matrix.triplet }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 24
- uses: oven-sh/setup-bun@v2
- run: npm install
- run: npm run bun:smoke
- run: npm run bun:smoke:pack

build:
uses: Datadog/action-prebuildify/.github/workflows/build.yml@main
with:
Expand All @@ -44,7 +67,7 @@ jobs:
skip: 'linux-arm,linux-ia32' # skip building for these platforms

dev_publish:
needs: build
needs: [build, bun-smoke]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment: npm
Expand All @@ -66,7 +89,7 @@ jobs:

build-successful:
if: always()
needs: [build]
needs: [build, bun-smoke]
runs-on: ubuntu-latest
steps:
- name: Determine if everything is passing
Expand Down
25 changes: 24 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,31 @@ jobs:
min-node-version: 18
skip: 'linux-arm,linux-ia32' # skip building for these platforms

bun-smoke:
strategy:
fail-fast: false
matrix:
include:
- triplet: linux-x64
runs-on: ubuntu-latest
- triplet: linux-arm64
runs-on: ubuntu-24.04-arm
- triplet: darwin-arm64
runs-on: macos-14
runs-on: ${{ matrix.runs-on }}
name: bun-smoke-${{ matrix.triplet }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 24
- uses: oven-sh/setup-bun@v2
- run: npm install
- run: npm run bun:smoke
- run: npm run bun:smoke:pack

publish:
needs: build
needs: [build, bun-smoke]
runs-on: ubuntu-latest
environment: npm
permissions:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
.vscode
/*.build
/build
out
out/*
!out/src/
!out/src/**
Comment on lines -6 to +8
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? You also included all of out/src – which are generated code – into this PR.

node_modules
system-test/busybench/package-lock.json
system-test/busybench-js/package-lock.json
Expand Down
40 changes: 40 additions & 0 deletions out/src/bun-native-backend.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* Copyright 2026 Datadog
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
import { AllocationProfileNode, TimeProfile, TimeProfilerMetrics } from './v8-types';
export declare class BunTimeProfiler {
metrics: TimeProfilerMetrics;
state: {
[key: string]: number;
};
private readonly withContexts;
private readonly intervalMicros;
private readonly collectCpuTime;
private started;
private startTime;
private contextTimeline;
private currentContext;
private currentContextSignature;
private lastRecordedContextSignature;
private lastContextCpuUsage;
constructor(...args: unknown[]);
get context(): object | undefined;
set context(context: object | undefined);
private recordContext;
private normalizedContextTimeline;
start(): void;
stop(restart: boolean): TimeProfile;
dispose(): void;
v8ProfilerStuckEventLoopDetected(): number;
}
export declare function bunGetNativeThreadId(): number;
export declare function bunStartSamplingHeapProfiler(): void;
export declare function bunStopSamplingHeapProfiler(): void;
export declare function bunGetAllocationProfile(): AllocationProfileNode;
export declare function bunMonitorOutOfMemory(_heapLimitExtensionSize: number, _maxHeapLimitExtensionCount: number, _dumpHeapProfileOnSdterr: boolean, _exportCommand: Array<String> | undefined, _callback: unknown, _callbackMode: number, _isMainThread: boolean): void;
Loading