ScaleBun
Skip to article

Performance

webDeveloper

The ScaleBun.performance namespace — 5 members.

Updated Reviewed
TypeScript
import ScaleBun from '@scalebun/web';
ScaleBun.performance.<method>(…);

Members#

MemberSignature
startTransactionstartTransaction(name: string): TransactionHandle
startTracestartTrace(name: string): void
stopTracestopTrace(name: string): void
markScreenLoadStartmarkScreenLoadStart(_screen: string): void
sendMetricsendMetric(metric: string, value: number): void

Reference#

startTransaction#

TypeScript
ScaleBun.performance.startTransaction(name: string): TransactionHandle

Open a RUM transaction (a timed root with a bounded span tree). Returns a handle: const t = ScaleBun.performance.startTransaction('checkout'); const s = t.startSpan('validate'); s.finish(); t.finish();. Safe before the engine loads (no-op handle).

startTrace#

TypeScript
ScaleBun.performance.startTrace(name: string): void

Begin a custom trace span — routed through PerformanceFeature (F-PERF).

stopTrace#

TypeScript
ScaleBun.performance.stopTrace(name: string): void

End a custom trace span → emits a performance item with the elapsed time.

markScreenLoadStart#

TypeScript
ScaleBun.performance.markScreenLoadStart(_screen: string): void

sendMetric#

TypeScript
ScaleBun.performance.sendMetric(metric: string, value: number): void
Performance · API reference · Web SDK · ScaleBun