mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-19 10:06:19 +01:00
more deterministics names for event leakage tracing (#215950)
This commit is contained in:
@@ -831,13 +831,15 @@ export function setGlobalLeakWarningThreshold(n: number): IDisposable {
|
||||
|
||||
class LeakageMonitor {
|
||||
|
||||
private static _idPool = 1;
|
||||
|
||||
private _stacks: Map<string, number> | undefined;
|
||||
private _warnCountdown: number = 0;
|
||||
|
||||
constructor(
|
||||
private readonly _errorHandler: (err: Error) => void,
|
||||
readonly threshold: number,
|
||||
readonly name: string = Math.random().toString(18).slice(2, 5),
|
||||
readonly name: string = (LeakageMonitor._idPool++).toString(16).padStart(3, '0')
|
||||
) { }
|
||||
|
||||
dispose(): void {
|
||||
|
||||
Reference in New Issue
Block a user