Skip to content

Commit d0418eb

Browse files
committed
chore(maint): measure tmp client creation
1 parent c3d8fe8 commit d0418eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/client/lib/client/enterprise-maintenance-manager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ export default class EnterpriseMaintenanceManager {
181181
dbgMaintenance("Pausing writing of new commands to old socket");
182182
this.#client._pause();
183183

184+
dbgMaintenance("Creating new tmp client");
185+
const start = performance.now();
184186
const tmpClient = this.#client.duplicate({
185187
maintPushNotifications: "disabled",
186188
socket: {
@@ -189,7 +191,7 @@ export default class EnterpriseMaintenanceManager {
189191
port,
190192
},
191193
});
192-
194+
dbgMaintenance(`Tmp client created in ${( performance.now() - start ).toFixed(2)}ms`);
193195
dbgMaintenance(`Connecting tmp client: ${host}:${port}`);
194196
await tmpClient.connect();
195197
dbgMaintenance(`Connected to tmp client`);

0 commit comments

Comments
 (0)