MCPcopy Index your code
hub / github.com/cameri/nostream / pickSamplePubkey

Function pickSamplePubkey

scripts/verify-index-impact.ts:171–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169}
170
171async function pickSamplePubkey(): Promise<Buffer | undefined> {
172 // Production REQ does not filter on deleted_at, so pick the densest pubkey
173 // regardless of soft-delete state — mirrors what EventRepository.findByFilters
174 // will actually scan.
175 const { rows } = await client.query<{ event_pubkey: Buffer }>(
176 'SELECT event_pubkey FROM events GROUP BY event_pubkey ORDER BY COUNT(*) DESC LIMIT 1',
177 )
178 return rows[0]?.event_pubkey
179}
180
181function cases(samplePubkey: Buffer): BenchmarkCase[] {
182 const now = Math.floor(Date.now() / 1000)

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected