From 0d8eda3f7bba9a524da7263867fb82fa5d7b31a7 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Tue, 17 Oct 2023 11:14:35 +0200 Subject: [PATCH 1/9] feat(types): Add macho debug image and measurements to Profile type --- packages/types/src/debugMeta.ts | 10 +++++++++- packages/types/src/profiling.ts | 10 ++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/types/src/debugMeta.ts b/packages/types/src/debugMeta.ts index da3cf958857b..01e9731b46b5 100644 --- a/packages/types/src/debugMeta.ts +++ b/packages/types/src/debugMeta.ts @@ -5,7 +5,7 @@ export interface DebugMeta { images?: Array; } -export type DebugImage = WasmDebugImage | SourceMapDebugImage; +export type DebugImage = WasmDebugImage | SourceMapDebugImage | MachoDebugImage; interface WasmDebugImage { type: 'wasm'; @@ -20,3 +20,11 @@ interface SourceMapDebugImage { code_file: string; // filename debug_id: string; // uuid } + +interface MachoDebugImage { + type: 'macho'; + debug_id: string; + image_addr: string; + image_size: number; + code_file: string; +} diff --git a/packages/types/src/profiling.ts b/packages/types/src/profiling.ts index 84a5238e7ace..10625acc7890 100644 --- a/packages/types/src/profiling.ts +++ b/packages/types/src/profiling.ts @@ -1,4 +1,6 @@ import type { DebugImage } from './debugMeta'; +import { MeasurementUnit } from './measurement'; + export type ThreadId = string; export type FrameId = number; export type StackId = number; @@ -6,6 +8,7 @@ export type StackId = number; export interface ThreadCpuSample { stack_id: StackId; thread_id: ThreadId; + queue_address?: string; elapsed_since_start_ns: string; } @@ -68,4 +71,11 @@ export interface Profile { relative_start_ns: string; relative_end_ns: string; }[]; + measurements?: Record; } From 9d3cc001d986e0452a86b9ef2c0dad2a15157b10 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Tue, 17 Oct 2023 22:43:51 +0200 Subject: [PATCH 2/9] Add missing properties to thread cpu frame --- packages/types/src/profiling.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/types/src/profiling.ts b/packages/types/src/profiling.ts index 10625acc7890..ac5d37c9acb3 100644 --- a/packages/types/src/profiling.ts +++ b/packages/types/src/profiling.ts @@ -15,11 +15,14 @@ export interface ThreadCpuSample { export type ThreadCpuStack = FrameId[]; export type ThreadCpuFrame = { - function: string; + function?: string; file?: string; lineno?: number; colno?: number; abs_path?: string; + platform?: string; + instruction_addr?: string; + module?: string; }; export interface ThreadCpuProfile { From d660ae724d784f4df1b84159f50fb65de005fd06 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Wed, 18 Oct 2023 13:29:01 +0200 Subject: [PATCH 3/9] Add `in_app` property to ThreadCpuFrame --- packages/types/src/profiling.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/types/src/profiling.ts b/packages/types/src/profiling.ts index ac5d37c9acb3..7ea138b1ad36 100644 --- a/packages/types/src/profiling.ts +++ b/packages/types/src/profiling.ts @@ -23,6 +23,7 @@ export type ThreadCpuFrame = { platform?: string; instruction_addr?: string; module?: string; + in_app?: boolean; }; export interface ThreadCpuProfile { From bc9cbc2e37ababe048f5564f2d90d9f851ee0dae Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Wed, 18 Oct 2023 13:38:38 +0200 Subject: [PATCH 4/9] Update macho debug image --- packages/types/src/debugMeta.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/types/src/debugMeta.ts b/packages/types/src/debugMeta.ts index 01e9731b46b5..44ada6fd0e86 100644 --- a/packages/types/src/debugMeta.ts +++ b/packages/types/src/debugMeta.ts @@ -25,6 +25,6 @@ interface MachoDebugImage { type: 'macho'; debug_id: string; image_addr: string; - image_size: number; - code_file: string; + image_size?: number; + code_file?: string; } From 3a3ac476c68ae4bc6199ce7beb74a97f440f17fc Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Wed, 18 Oct 2023 14:50:59 +0200 Subject: [PATCH 5/9] Fix lint --- packages/types/src/profiling.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/types/src/profiling.ts b/packages/types/src/profiling.ts index 7ea138b1ad36..3650500fcd7b 100644 --- a/packages/types/src/profiling.ts +++ b/packages/types/src/profiling.ts @@ -1,5 +1,5 @@ import type { DebugImage } from './debugMeta'; -import { MeasurementUnit } from './measurement'; +import type { MeasurementUnit } from './measurement'; export type ThreadId = string; export type FrameId = number; @@ -75,11 +75,14 @@ export interface Profile { relative_start_ns: string; relative_end_ns: string; }[]; - measurements?: Record; + measurements?: Record< + string, + { + unit: MeasurementUnit; + values: { + elapsed_since_start_ns: number; + value: number; + }[]; + } + >; } From 6c86cc918403452c5b6ad5ac95e781ab60947179 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Wed, 18 Oct 2023 16:36:51 +0200 Subject: [PATCH 6/9] Allow deno test failure --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66b282202f5e..9b81f7451546 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -427,6 +427,7 @@ jobs: job_deno_unit_tests: name: Deno Unit Tests needs: [job_get_metadata, job_build] + continue-on-error: true if: needs.job_get_metadata.outputs.changed_deno == 'true' || github.event_name != 'pull_request' timeout-minutes: 10 runs-on: ubuntu-20.04 From b29a2b1524d7b5daf088d9c246737cd009b6d88c Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Wed, 18 Oct 2023 16:48:52 +0200 Subject: [PATCH 7/9] remove deno unit test from the required --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b81f7451546..b0326a12f685 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -427,7 +427,6 @@ jobs: job_deno_unit_tests: name: Deno Unit Tests needs: [job_get_metadata, job_build] - continue-on-error: true if: needs.job_get_metadata.outputs.changed_deno == 'true' || github.event_name != 'pull_request' timeout-minutes: 10 runs-on: ubuntu-20.04 @@ -935,7 +934,6 @@ jobs: job_browser_build_tests, job_browser_unit_tests, job_bun_unit_tests, - job_deno_unit_tests, job_node_unit_tests, job_nextjs_integration_test, job_node_integration_tests, From 885a74e04f4daff4d8130d23657988513437c69c Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Wed, 18 Oct 2023 19:51:08 +0200 Subject: [PATCH 8/9] Revert "remove deno unit test from the required" This reverts commit b29a2b1524d7b5daf088d9c246737cd009b6d88c. --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0326a12f685..9b81f7451546 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -427,6 +427,7 @@ jobs: job_deno_unit_tests: name: Deno Unit Tests needs: [job_get_metadata, job_build] + continue-on-error: true if: needs.job_get_metadata.outputs.changed_deno == 'true' || github.event_name != 'pull_request' timeout-minutes: 10 runs-on: ubuntu-20.04 @@ -934,6 +935,7 @@ jobs: job_browser_build_tests, job_browser_unit_tests, job_bun_unit_tests, + job_deno_unit_tests, job_node_unit_tests, job_nextjs_integration_test, job_node_integration_tests, From 382f9e5b78baa3d18cc551377ccd43ad97605b04 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Wed, 18 Oct 2023 19:51:17 +0200 Subject: [PATCH 9/9] Revert "Allow deno test failure" This reverts commit 6c86cc918403452c5b6ad5ac95e781ab60947179. --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b81f7451546..66b282202f5e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -427,7 +427,6 @@ jobs: job_deno_unit_tests: name: Deno Unit Tests needs: [job_get_metadata, job_build] - continue-on-error: true if: needs.job_get_metadata.outputs.changed_deno == 'true' || github.event_name != 'pull_request' timeout-minutes: 10 runs-on: ubuntu-20.04