Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-2019, ubuntu-latest]
node-version: [14.x, 16.x, 18.x]
node-version: [14.x, 16.x, 18.x, 19.x]
target: [x64]
host: [x64]
# arm64 is not supported by gh runners yet
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-2019, ubuntu-latest]
node-version: [14.x, 16.x, 18.x]
node-version: [14.x, 16.x, 18.x, 19.x]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
8 changes: 3 additions & 5 deletions bindings/cpu_profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,10 @@ static void StartProfiling(const v8::FunctionCallbackInfo<v8::Value>& args) {

v8::Local<v8::String> title = Nan::To<v8::String>(args[0]).ToLocalChecked();

v8::CpuProfilingOptions options = v8::CpuProfilingOptions{
v8::CpuProfilingMode::kCallerLineNumbers, v8::CpuProfilingOptions::kNoSampleLimit,
SAMPLING_INTERVAL_US };

Profiler* profiler = reinterpret_cast<Profiler*>(args.Data().As<v8::External>()->Value());
profiler->cpu_profiler->StartProfiling(title, options);
profiler->cpu_profiler->StartProfiling(title, {
v8::CpuProfilingMode::kCallerLineNumbers, v8::CpuProfilingOptions::kNoSampleLimit,
SAMPLING_INTERVAL_US });
};

// StopProfiling(string title)
Expand Down
1 change: 0 additions & 1 deletion src/cpu_profiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ interface V8CpuProfilerBindings {
stopProfiling(name: string): RawThreadCpuProfile | null;
}

console.log(projectRootDirectory);
const privateBindings: PrivateV8CpuProfilerBindings = importCppBindingsModule();
const CpuProfilerBindings: V8CpuProfilerBindings = {
startProfiling(name: string) {
Expand Down
5 changes: 4 additions & 1 deletion src/hubextensions.hub.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ describe('hubextensions', () => {
});

it('respect max profile duration timeout', async () => {
jest.useFakeTimers();
// it seems that in node 19 globals (or least part of them) are a readonly object
// so when useFakeTimers is called it throws an error because it cannot override
// a readonly property of performance on global object. Use legacyFakeTimers for now
jest.useFakeTimers({ legacyFakeTimers: true });
const startProfilingSpy = jest.spyOn(profiler, 'startProfiling');
const stopProfilingSpy = jest.spyOn(profiler, 'stopProfiling');
const transport = Sentry.getCurrentHub().getClient()?.getTransport();
Expand Down