Update backup benchmark timing
This commit is contained in:
@@ -302,7 +302,7 @@ export class BackupsService {
|
|||||||
|
|
||||||
log.info(`importBackup: starting ${backupType}...`);
|
log.info(`importBackup: starting ${backupType}...`);
|
||||||
this.isRunning = 'import';
|
this.isRunning = 'import';
|
||||||
|
const importStart = Date.now();
|
||||||
try {
|
try {
|
||||||
const importStream = await BackupImportStream.create(backupType);
|
const importStream = await BackupImportStream.create(backupType);
|
||||||
if (backupType === BackupType.Ciphertext) {
|
if (backupType === BackupType.Ciphertext) {
|
||||||
@@ -390,7 +390,9 @@ export class BackupsService {
|
|||||||
this.isRunning = false;
|
this.isRunning = false;
|
||||||
window.IPC.stopTrackingQueryStats({ epochName: 'Backup Import' });
|
window.IPC.stopTrackingQueryStats({ epochName: 'Backup Import' });
|
||||||
if (window.SignalCI) {
|
if (window.SignalCI) {
|
||||||
window.SignalCI.handleEvent('backupImportComplete', null);
|
window.SignalCI.handleEvent('backupImportComplete', {
|
||||||
|
duration: Date.now() - importStart,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -19,19 +19,15 @@ Bootstrap.benchmark(async (bootstrap: Bootstrap): Promise<void> => {
|
|||||||
|
|
||||||
await server.storeBackupOnCdn(backupId, backupStream);
|
await server.storeBackupOnCdn(backupId, backupStream);
|
||||||
|
|
||||||
const importStart = Date.now();
|
|
||||||
|
|
||||||
const app = await bootstrap.link();
|
const app = await bootstrap.link();
|
||||||
await app.waitForBackupImportComplete();
|
const { duration: importDuration } = await app.waitForBackupImportComplete();
|
||||||
|
|
||||||
const importEnd = Date.now();
|
|
||||||
|
|
||||||
const exportStart = Date.now();
|
const exportStart = Date.now();
|
||||||
await app.uploadBackup();
|
await app.uploadBackup();
|
||||||
const exportEnd = Date.now();
|
const exportEnd = Date.now();
|
||||||
|
|
||||||
console.log('run=%d info=%j', 0, {
|
console.log('run=%d info=%j', 0, {
|
||||||
importDuration: importEnd - importStart,
|
importDuration,
|
||||||
exportDuration: exportEnd - exportStart,
|
exportDuration: exportEnd - exportStart,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -109,7 +109,7 @@ export class App extends EventEmitter {
|
|||||||
return this.waitForEvent('contactSync');
|
return this.waitForEvent('contactSync');
|
||||||
}
|
}
|
||||||
|
|
||||||
public async waitForBackupImportComplete(): Promise<void> {
|
public async waitForBackupImportComplete(): Promise<{ duration: number }> {
|
||||||
return this.waitForEvent('backupImportComplete');
|
return this.waitForEvent('backupImportComplete');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user