From 9cfb67bab9b32441237f92d4ba29a7f3ccff259f Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 30 Jun 2026 16:49:24 +0100 Subject: [PATCH] Add clarifying comments --- src/database-upload.ts | 2 ++ src/util.ts | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/database-upload.ts b/src/database-upload.ts index 0bd99422a..0189bef1e 100644 --- a/src/database-upload.ts +++ b/src/database-upload.ts @@ -205,6 +205,8 @@ async function recordClearCleanupSizes( reports: DatabaseUploadResult[], logger: Logger, ): Promise { + // Include both the cleanup and the re-bundling to record how much time taking this measurement adds + // to the run. const startTime = performance.now(); try { diff --git a/src/util.ts b/src/util.ts index 200d68d2c..fc0553b1b 100644 --- a/src/util.ts +++ b/src/util.ts @@ -712,7 +712,13 @@ export function getBaseDatabaseOidsFilePath(config: Config): string { return path.join(config.dbLocation, BASE_DATABASE_OIDS_FILE_NAME); } -// Create a bundle for the given DB, if it doesn't already exist +/** + * Bundles the database for the given language into a `.zip` file, returning the path to it. + * + * If a bundle for `dbName` already exists (e.g. from an earlier call), it is deleted and + * re-created, so each call produces a fresh bundle reflecting the current database contents and the + * given `includeDiagnostics` value. + */ export async function bundleDb( config: Config, language: Language,