@powerhousedao/switchboard 6.0.0-dev.22 → 6.0.0-dev.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## 6.0.0-dev.24 (2026-01-27)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **switchboard:** enhance pyroscope profiler with wall and heap support ([254c0cea9](https://github.com/powerhouse-inc/powerhouse/commit/254c0cea9))
6
+ - **monorepo:** ensure the same typescript version is used everywhere ([#2258](https://github.com/powerhouse-inc/powerhouse/pull/2258))
7
+
8
+ ### 🩹 Fixes
9
+
10
+ - **vetra,switchboard:** fix TypeScript errors in permission tests and profiler ([7726f95a3](https://github.com/powerhouse-inc/powerhouse/commit/7726f95a3))
11
+
12
+ ### ❤️ Thank You
13
+
14
+ - Frank
15
+ - Ryan Wolhuter @ryanwolhuter
16
+
17
+ ## 6.0.0-dev.23 (2026-01-27)
18
+
19
+ ### 🚀 Features
20
+
21
+ - **monorepo:** add diff filter to exclude deleted files in changed files action ([e86961e79](https://github.com/powerhouse-inc/powerhouse/commit/e86961e79))
22
+ - **academy:** added release slides to academy project ([eab5e56fe](https://github.com/powerhouse-inc/powerhouse/commit/eab5e56fe))
23
+
24
+ ### ❤️ Thank You
25
+
26
+ - acaldas @acaldas
27
+ - ryanwolhuter @ryanwolhuter
28
+
1
29
  ## 6.0.0-dev.22 (2026-01-27)
2
30
 
3
31
  ### 🩹 Fixes
@@ -1,4 +1,9 @@
1
1
  import type { PyroscopeConfig } from "@pyroscope/nodejs";
2
2
  export declare function initProfilerFromEnv(env: typeof process.env): Promise<void>;
3
- export declare function initProfiler(options?: PyroscopeConfig): Promise<void>;
3
+ interface ProfilerFlags {
4
+ wallEnabled?: boolean;
5
+ heapEnabled?: boolean;
6
+ }
7
+ export declare function initProfiler(options?: PyroscopeConfig, flags?: ProfilerFlags): Promise<void>;
8
+ export {};
4
9
  //# sourceMappingURL=profiler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"profiler.d.ts","sourceRoot":"","sources":["../../src/profiler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,OAAO,OAAO,CAAC,GAAG,iBAehE;AAED,wBAAsB,YAAY,CAAC,OAAO,CAAC,EAAE,eAAe,iBAK3D"}
1
+ {"version":3,"file":"profiler.d.ts","sourceRoot":"","sources":["../../src/profiler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,OAAO,OAAO,CAAC,GAAG,iBAgChE;AAED,UAAU,aAAa;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAsB,YAAY,CAChC,OAAO,CAAC,EAAE,eAAe,EACzB,KAAK,GAAE,aAAyD,iBAqBjE"}
@@ -1,17 +1,43 @@
1
1
  export async function initProfilerFromEnv(env) {
2
- const { PYROSCOPE_SERVER_ADDRESS: serverAddress, PYROSCOPE_APPLICATION_NAME: appName, PYROSCOPE_USER: basicAuthUser, PYROSCOPE_PASSWORD: basicAuthPassword, } = env;
2
+ const { PYROSCOPE_SERVER_ADDRESS: serverAddress, PYROSCOPE_APPLICATION_NAME: appName, PYROSCOPE_USER: basicAuthUser, PYROSCOPE_PASSWORD: basicAuthPassword, PYROSCOPE_WALL_ENABLED: wallEnabled, PYROSCOPE_HEAP_ENABLED: heapEnabled, } = env;
3
3
  const options = {
4
4
  serverAddress,
5
5
  appName,
6
6
  basicAuthUser,
7
7
  basicAuthPassword,
8
+ // Wall profiling captures wall-clock time (includes async I/O waits)
9
+ // This shows GraphQL resolvers even when waiting for database
10
+ wall: {
11
+ samplingDurationMs: 10000, // 10 second sampling windows
12
+ samplingIntervalMicros: 10000, // 10ms sampling interval (100 samples/sec)
13
+ collectCpuTime: true, // Also collect CPU time alongside wall time
14
+ },
15
+ // Heap profiling for memory allocation tracking
16
+ heap: {
17
+ samplingIntervalBytes: 512 * 1024, // Sample every 512KB allocated
18
+ stackDepth: 64, // Capture deeper stacks for better context
19
+ },
8
20
  };
9
- return initProfiler(options);
21
+ return initProfiler(options, {
22
+ wallEnabled: wallEnabled !== "false",
23
+ heapEnabled: heapEnabled === "true",
24
+ });
10
25
  }
11
- export async function initProfiler(options) {
26
+ export async function initProfiler(options, flags = { wallEnabled: true, heapEnabled: false }) {
12
27
  console.log("Initializing Pyroscope profiler at:", options?.serverAddress);
13
- const Pyroscope = await import("@pyroscope/nodejs");
28
+ console.log(" Wall profiling:", flags.wallEnabled ? "enabled" : "disabled");
29
+ console.log(" Heap profiling:", flags.heapEnabled ? "enabled" : "disabled");
30
+ const { default: Pyroscope } = await import("@pyroscope/nodejs");
14
31
  Pyroscope.init(options);
15
- Pyroscope.start();
32
+ // Start wall profiling (captures async I/O time - shows resolvers)
33
+ if (flags.wallEnabled) {
34
+ Pyroscope.startWallProfiling();
35
+ }
36
+ // Start CPU profiling (captures CPU-bound work)
37
+ Pyroscope.startCpuProfiling();
38
+ // Optionally start heap profiling (memory allocations)
39
+ if (flags.heapEnabled) {
40
+ Pyroscope.startHeapProfiling();
41
+ }
16
42
  }
17
43
  //# sourceMappingURL=profiler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"profiler.js","sourceRoot":"","sources":["../../src/profiler.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,GAAuB;IAC/D,MAAM,EACJ,wBAAwB,EAAE,aAAa,EACvC,0BAA0B,EAAE,OAAO,EACnC,cAAc,EAAE,aAAa,EAC7B,kBAAkB,EAAE,iBAAiB,GACtC,GAAG,GAAG,CAAC;IAER,MAAM,OAAO,GAAoB;QAC/B,aAAa;QACb,OAAO;QACP,aAAa;QACb,iBAAiB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