Update backup benchmark timing
This commit is contained in:
parent
ca20d07f75
commit
5762c8a37f
3 changed files with 7 additions and 9 deletions
|
@ -302,7 +302,7 @@ export class BackupsService {
|
|||
|
||||
log.info(`importBackup: starting ${backupType}...`);
|
||||
this.isRunning = 'import';
|
||||
|
||||
const importStart = Date.now();
|
||||
try {
|
||||
const importStream = await BackupImportStream.create(backupType);
|
||||
if (backupType === BackupType.Ciphertext) {
|
||||
|
@ -390,7 +390,9 @@ export class BackupsService {
|
|||
this.isRunning = false;
|
||||
window.IPC.stopTrackingQueryStats({ epochName: 'Backup Import' });
|
||||
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);
|
||||
|
||||
const importStart = Date.now();
|
||||
|
||||
const app = await bootstrap.link();
|
||||
await app.waitForBackupImportComplete();
|
||||
|
||||
const importEnd = Date.now();
|
||||
const { duration: importDuration } = await app.waitForBackupImportComplete();
|
||||
|
||||
const exportStart = Date.now();
|
||||
await app.uploadBackup();
|
||||
const exportEnd = Date.now();
|
||||
|
||||
console.log('run=%d info=%j', 0, {
|
||||
importDuration: importEnd - importStart,
|
||||
importDuration,
|
||||
exportDuration: exportEnd - exportStart,
|
||||
});
|
||||
});
|
||||
|
|
|
@ -109,7 +109,7 @@ export class App extends EventEmitter {
|
|||
return this.waitForEvent('contactSync');
|
||||
}
|
||||
|
||||
public async waitForBackupImportComplete(): Promise<void> {
|
||||
public async waitForBackupImportComplete(): Promise<{ duration: number }> {
|
||||
return this.waitForEvent('backupImportComplete');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue