feat(audit): Batch 23 — settings key renames with migration (CC1) + config.ts (CC11)
CC1: customCommandEnabled→enableCustomCommands, downloadArchive→ useDownloadArchive, clipboardWatch→watchClipboard, sidebarCollapsed→ isSidebarCollapsed, hardwareAcceleration→useHardwareAcceleration, videoDir/audioDir→videoFolder/audioFolder (+ chooseDir/clearDir store actions → chooseFolder/clearFolder). Rename map in settingsMigration.ts (pure, unit-tested incl. pre-rename backup fixture), applied as an idempotent on-disk shim at store open and on backup import so old settings.json and old backups both keep working. CC11: update host/owner/repo + release API moved to src/main/config.ts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -57,21 +57,21 @@ function bench(items: DownloadItem[], maxConcurrent: number, iterations: number)
|
||||
describe('pump() cost at scale (PERF3)', () => {
|
||||
it('a full scan+promote over 5,000 items is well under a millisecond-scale budget', () => {
|
||||
const median = bench(makeItems(5_000), 3 + 1_250, 50) // slots open → full pipeline
|
||||
|
||||
|
||||
console.log(`pump pipeline @5k items: median ${median.toFixed(3)} ms`)
|
||||
expect(median).toBeLessThan(5)
|
||||
})
|
||||
|
||||
it('a full scan+promote over 20,000 items stays inside a 5 ms budget', () => {
|
||||
const median = bench(makeItems(20_000), 3 + 5_000, 50)
|
||||
|
||||
|
||||
console.log(`pump pipeline @20k items: median ${median.toFixed(3)} ms`)
|
||||
expect(median).toBeLessThan(5)
|
||||
})
|
||||
|
||||
it('the no-free-slot fast path (the per-progress-event case) is trivially cheap', () => {
|
||||
const median = bench(makeItems(20_000), 1, 100) // running >= cap → early return
|
||||
|
||||
|
||||
console.log(`pump no-slot path @20k items: median ${median.toFixed(3)} ms`)
|
||||
expect(median).toBeLessThan(2)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user