bun-types
Advanced tools
Comparing version 1.1.18-canary.20240706T140505 to 1.1.18-canary.20240707T140453
37
jsc.d.ts
@@ -91,17 +91,3 @@ declare module "bun:jsc" { | ||
/** | ||
* Run JavaScriptCore's sampling profiler for a particular function | ||
* | ||
* This is pretty low-level. | ||
* | ||
* Things to know: | ||
* - LLint means "Low Level Interpreter", which is the interpreter that runs before any JIT compilation | ||
* - Baseline is the first JIT compilation tier. It's the least optimized, but the fastest to compile | ||
* - DFG means "Data Flow Graph", which is the second JIT compilation tier. It has some optimizations, but is slower to compile | ||
* - FTL means "Faster Than Light", which is the third JIT compilation tier. It has the most optimizations, but is the slowest to compile | ||
*/ | ||
function profile( | ||
callback: CallableFunction, | ||
sampleInterval?: number, | ||
): { | ||
interface SamplingProfile { | ||
/** | ||
@@ -197,5 +183,24 @@ * A formatted summary of the top functions | ||
stackTraces: string[]; | ||
}; | ||
} | ||
/** | ||
* Run JavaScriptCore's sampling profiler for a particular function | ||
* | ||
* This is pretty low-level. | ||
* | ||
* Things to know: | ||
* - LLint means "Low Level Interpreter", which is the interpreter that runs before any JIT compilation | ||
* - Baseline is the first JIT compilation tier. It's the least optimized, but the fastest to compile | ||
* - DFG means "Data Flow Graph", which is the second JIT compilation tier. It has some optimizations, but is slower to compile | ||
* - FTL means "Faster Than Light", which is the third JIT compilation tier. It has the most optimizations, but is the slowest to compile | ||
*/ | ||
function profile<T extends (...args: any[]) => any>( | ||
callback: T, | ||
sampleInterval?: number, | ||
...args: Parameters<T> | ||
): ReturnType<T> extends Promise<infer U> | ||
? Promise<SamplingProfile> | ||
: SamplingProfile; | ||
/** | ||
* This returns objects which native code has explicitly protected from being | ||
@@ -202,0 +207,0 @@ * garbage collected |
{ | ||
"version": "1.1.18-canary.20240706T140505", | ||
"version": "1.1.18-canary.20240707T140453", | ||
"name": "bun-types", | ||
@@ -4,0 +4,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
369174
11935