Albums: no numbered volumes or stray suffixes; the replay report counts the group's releases
acs5152s1.11 is a volume, Broforce.vol00+01.par2.temp a par2: neither an album's member. replay:corpus reported every release in the scratch catalog as the group's. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
4d0610ca06
commit
6860e6ccaf
2 files changed
+15
-8
No files matched your search
@@ -199,7 +199,7 @@ export default class ReplayCorpus extends BaseCommand {
|
||||
this.exitCode = 1
|
||||
return
|
||||
}
|
||||
await this.report(ranges, Date.now() - started)
|
||||
await this.report(groupId, ranges, Date.now() - started)
|
||||
}
|
||||
|
||||
private async benchBinary(): Promise<string | null> {
|
||||
@@ -310,8 +310,8 @@ export default class ReplayCorpus extends BaseCommand {
|
||||
return out
|
||||
}
|
||||
|
||||
/** What the replay left in the catalog, and its size per article. */
|
||||
private async report(ranges: StoredRange[], elapsedMs: number) {
|
||||
/** What the replay left in the catalog (this group's releases; the sizes are the whole catalog's), per article. */
|
||||
private async report(groupId: number, ranges: StoredRange[], elapsedMs: number) {
|
||||
const ids = ranges.map((r) => r.id)
|
||||
const { rows: counts } = await db.rawQuery(
|
||||
`SELECT count(*)::bigint AS releases,
|
||||
@@ -326,10 +326,12 @@ export default class ReplayCorpus extends BaseCommand {
|
||||
coalesce(sum(files), 0)::bigint AS files,
|
||||
coalesce(sum(segments), 0)::bigint AS segments,
|
||||
coalesce(sum(bytes), 0)::bigint AS bytes
|
||||
FROM releases`
|
||||
FROM releases WHERE group_id = ?`,
|
||||
[groupId]
|
||||
)
|
||||
const { rows: sources } = await db.rawQuery(
|
||||
`SELECT source, count(*)::bigint AS n FROM releases GROUP BY source ORDER BY source`
|
||||
`SELECT source, count(*)::bigint AS n FROM releases WHERE group_id = ? GROUP BY source ORDER BY source`,
|
||||
[groupId]
|
||||
)
|
||||
const { rows: headerRows } = await db.rawQuery(
|
||||
`SELECT coalesce(sum(headers), 0)::bigint AS headers FROM ranges WHERE id = ANY(?::bigint[])`,
|
||||
@@ -371,7 +373,7 @@ export default class ReplayCorpus extends BaseCommand {
|
||||
)
|
||||
}
|
||||
this.logger.info(
|
||||
`NVMe tables: ${(nvme / 1e6).toFixed(1)} MB, ${(nvme / Math.max(1, headers)).toFixed(2)} B/header; HDD tables (CHUNK_TABLESPACE): ${(other / 1e6).toFixed(1)} MB, ${(other / Math.max(1, headers)).toFixed(2)} B/header.`
|
||||
`NVMe tables: ${(nvme / 1e6).toFixed(1)} MB, ${(nvme / Math.max(1, headers)).toFixed(2)} B/header; HDD tables (CHUNK_TABLESPACE): ${(other / 1e6).toFixed(1)} MB, ${(other / Math.max(1, headers)).toFixed(2)} B/header (the whole catalog's sizes over this group's headers: only the first group's are its own).`
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user