perf(observabilidade): synchronous=NORMAL e upsertMany transaccional
This commit is contained in:
@@ -68,4 +68,14 @@ describe('sessions db', () => {
|
||||
db.upsertSession(sampleMeta({ session_id: 'b', jsonl_path: '/tmp/b.jsonl' }))
|
||||
expect(db.countSessions({})).toBe(2)
|
||||
})
|
||||
|
||||
it('upsertMany insere batch em transacção', () => {
|
||||
const db = openSessionsDb(dbPath)
|
||||
db.upsertMany([
|
||||
sampleMeta({ session_id: 'x', jsonl_path: '/tmp/x.jsonl' }),
|
||||
sampleMeta({ session_id: 'y', jsonl_path: '/tmp/y.jsonl' }),
|
||||
sampleMeta({ session_id: 'z', jsonl_path: '/tmp/z.jsonl' }),
|
||||
])
|
||||
expect(db.countSessions({})).toBe(3)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user