Add clarifying comments

This commit is contained in:
Henry Mercer
2026-06-30 16:49:24 +01:00
parent 6f8864c8b0
commit 9cfb67bab9
2 changed files with 9 additions and 1 deletions

View File

@@ -205,6 +205,8 @@ async function recordClearCleanupSizes(
reports: DatabaseUploadResult[],
logger: Logger,
): Promise<void> {
// 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 {

View File

@@ -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,