dsh-memu-memory 1.4.3 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +3 -1
- package/CHANGELOG.md +15 -0
- package/README.md +34 -15
- package/README.zh.md +35 -13
- package/assets/screenshots/drawer.jpg +0 -0
- package/assets/screenshots/libraries.jpg +0 -0
- package/assets/screenshots/mobile.jpg +0 -0
- package/assets/screenshots/relations.jpg +0 -0
- package/assets/screenshots/settings.jpg +0 -0
- package/assets/screenshots/webui-dark.jpg +0 -0
- package/assets/screenshots/webui-memory.jpg +0 -0
- package/docs/client-conventions.md +19 -3
- package/docs/contributing.md +4 -2
- package/docs/env-and-commands.md +9 -1
- package/docs/graph-scale.md +214 -0
- package/docs/lexicon-recall.md +100 -0
- package/docs/mcp-porting.md +8 -6
- package/docs/memory-semantics.md +35 -3
- package/docs/pending-work.md +3 -1
- package/docs/retention.md +83 -0
- package/docs/rt-index.md +452 -0
- package/docs/scale-performance.md +101 -0
- package/docs/token-budget.md +92 -0
- package/docs/troubleshooting.md +50 -11
- package/lib/auto-link/apply.js +7 -2
- package/lib/auto-link/candidates.js +32 -10
- package/lib/backup.js +67 -32
- package/lib/binding-diagnostics.js +1 -1
- package/lib/bounded-cache.js +80 -0
- package/lib/client.js +2096 -409
- package/lib/consolidation-ledger.js +21 -4
- package/lib/consolidation-worker.js +14 -1
- package/lib/cycle.js +16 -11
- package/lib/diagnostic-context.js +372 -0
- package/lib/diagnostics.js +147 -61
- package/lib/embedding-download.js +7 -8
- package/lib/engine-sources.js +286 -0
- package/lib/engine.js +23 -10
- package/lib/entity-repair.js +43 -13
- package/lib/entity-review.js +64 -0
- package/lib/environment-check.js +348 -36
- package/lib/feedback.js +25 -0
- package/lib/global-graph.js +46 -2
- package/lib/graph-adjacency-index.js +525 -0
- package/lib/graph-overview.js +293 -0
- package/lib/graph.js +658 -105
- package/lib/inbound.js +44 -15
- package/lib/index-pages.js +57 -0
- package/lib/index.js +44 -6
- package/lib/inject.js +119 -50
- package/lib/lexicon-rt-source.js +25 -0
- package/lib/lexicon-rt-worker.js +26 -0
- package/lib/lexicon-rt.js +224 -0
- package/lib/lexicon-scope.js +56 -5
- package/lib/lexicon.js +143 -54
- package/lib/local-vector-service.js +3 -0
- package/lib/maintenance-ledger.js +542 -12
- package/lib/managed-runtime.js +260 -80
- package/lib/media.js +1 -1
- package/lib/memory.js +564 -131
- package/lib/port-surface.js +96 -11
- package/lib/preset-mount.js +13 -7
- package/lib/private.js +47 -21
- package/lib/recall-cache.js +20 -34
- package/lib/retention.js +173 -0
- package/lib/rpc.js +135 -52
- package/lib/rt-index/builder.js +209 -0
- package/lib/rt-index/format.js +231 -0
- package/lib/rt-index/manifest.js +105 -0
- package/lib/rt-index/reader.js +673 -0
- package/lib/rt-index-retention.js +151 -0
- package/lib/rt-index-service.js +283 -0
- package/lib/rt-index-worker.js +21 -0
- package/lib/salient-wake.js +55 -4
- package/lib/state.js +195 -24
- package/lib/temporal.js +39 -13
- package/lib/token-measurement.js +126 -0
- package/lib/tools.js +101 -6
- package/lib/turn-log.js +108 -3
- package/lib/webui/graph-layout-worker.js +68 -0
- package/lib/webui/graph-local-physics.js +390 -0
- package/lib/webui/graph-spatial-grid.js +64 -0
- package/lib/webui/graph-view.bundle.js +6 -1
- package/lib/webui/graph-view.js +478 -135
- package/lib/webui/graph-webgl-renderer.js +74 -0
- package/lib/webui/standalone.js +1 -1
- package/lib/worker-pool.js +38 -7
- package/package.json +3 -2
- package/scripts/acceptance-local.mjs +4 -10
- package/scripts/bench-all-libraries.mjs +47 -0
- package/scripts/check-classic-graph-browser.mjs +189 -0
- package/scripts/check-client-browser.mjs +929 -0
- package/scripts/check-graph-browser.mjs +6 -0
- package/scripts/check-graph-elastic-browser.mjs +139 -0
- package/scripts/check-memory-review-browser.mjs +124 -0
- package/scripts/entity-dedupe.mjs +19 -3
- package/scripts/graph-artifact-provenance.mjs +30 -0
- package/scripts/graph-freeze-manifest.mjs +129 -0
- package/scripts/graph-geometry-fixture.mjs +40 -0
- package/scripts/graph-physics-bench.mjs +218 -0
- package/scripts/graph-scale-bench.mjs +213 -0
- package/scripts/graph-scale-memory.mjs +48 -0
- package/scripts/graph-service-bench.mjs +72 -0
- package/scripts/make-readme-shots.mjs +17 -5
- package/scripts/preview.mjs +1 -0
- package/scripts/rebuild-rt.mjs +18 -0
- package/scripts/scale-bench.mjs +183 -0
- package/scripts/simulate-injection.mjs +47 -8
- package/scripts/verify-host-fixtures.mjs +108 -0
- package/scripts/verify-host-recovery.mjs +565 -0
- package/scripts/verify-vector-recovery.mjs +740 -0
- package/tests/auto-link-candidates.test.mjs +20 -0
- package/tests/browser.test.mjs +16 -2
- package/tests/client-export.test.mjs +16 -1
- package/tests/client-pagination.test.mjs +1495 -0
- package/tests/client-render.test.mjs +223 -28
- package/tests/consolidation-fork.test.mjs +97 -13
- package/tests/consolidation-ledger.test.mjs +17 -1
- package/tests/diagnostic-entity-candidates.test.mjs +54 -0
- package/tests/diagnostic-report.test.mjs +429 -0
- package/tests/diagnostic-wiring.test.mjs +88 -0
- package/tests/diagnostics.test.mjs +27 -0
- package/tests/embedding-download.test.mjs +44 -0
- package/tests/engine-source-settings.test.mjs +69 -0
- package/tests/engine-sources.test.mjs +145 -0
- package/tests/entity-dedupe.test.mjs +143 -0
- package/tests/entity-merge-review.test.mjs +363 -0
- package/tests/entity-merge.test.mjs +12 -4
- package/tests/entity-review.test.mjs +87 -0
- package/tests/environment-check.test.mjs +51 -1
- package/tests/feedback.test.mjs +95 -0
- package/tests/graph-adjacency-index.test.mjs +536 -0
- package/tests/graph-cascade.test.mjs +229 -0
- package/tests/graph-import-diagnostic.test.mjs +25 -0
- package/tests/graph-overview.test.mjs +709 -0
- package/tests/graph-session-authorization.test.mjs +419 -0
- package/tests/graph-view-geometry.test.mjs +426 -0
- package/tests/graph-view-scale.test.mjs +88 -0
- package/tests/graph-view.test.mjs +444 -5
- package/tests/graph.test.mjs +43 -0
- package/tests/help-page.test.mjs +128 -54
- package/tests/inbound.test.mjs +19 -0
- package/tests/index-pagination.test.mjs +113 -0
- package/tests/index-read-view.test.mjs +212 -0
- package/tests/inject-guide.test.mjs +9 -0
- package/tests/injection-dedupe.test.mjs +213 -0
- package/tests/lexicon-recall.test.mjs +641 -0
- package/tests/lexicon-rt-lifecycle.test.mjs +196 -0
- package/tests/lexicon-rt.test.mjs +468 -0
- package/tests/local-embedding-worker.test.mjs +38 -0
- package/tests/local-vector-service.test.mjs +32 -3
- package/tests/maintenance-compat.test.mjs +128 -0
- package/tests/maintenance-settlement.test.mjs +1003 -0
- package/tests/managed-memory.test.mjs +39 -11
- package/tests/managed-runtime.test.mjs +109 -0
- package/tests/memory-fields.test.mjs +24 -12
- package/tests/observed-evidence.test.mjs +52 -0
- package/tests/port-surface.test.mjs +93 -1
- package/tests/preset-mount.test.mjs +12 -4
- package/tests/recall-cache.test.mjs +56 -3
- package/tests/recall-dedup.test.mjs +63 -2
- package/tests/retention.test.mjs +260 -0
- package/tests/rt-index-cross-library.test.mjs +230 -0
- package/tests/rt-index-integration.test.mjs +194 -0
- package/tests/rt-index-retention.test.mjs +552 -0
- package/tests/rt-index-scale.test.mjs +204 -0
- package/tests/rt-index.test.mjs +705 -0
- package/tests/salient-date-boundaries.test.mjs +121 -0
- package/tests/salient-wake.test.mjs +29 -0
- package/tests/scale-bench.test.mjs +53 -0
- package/tests/settings-plumbing.test.mjs +25 -0
- package/tests/simulate-injection.test.mjs +15 -1
- package/tests/standalone-navigation.test.mjs +44 -0
- package/tests/state.test.mjs +51 -0
- package/tests/temporal-precision.test.mjs +102 -0
- package/tests/temporal.test.mjs +10 -6
- package/tests/token-measurement.test.mjs +98 -0
- package/tests/tool-schema.test.mjs +41 -5
- package/tests/tools.test.mjs +6 -3
- package/tests/turn-token-budget.test.mjs +149 -0
- package/tests/webui-auth.test.mjs +57 -1
- package/tests/webui.test.mjs +40 -15
- package/tests/worker-lifecycle.test.mjs +2 -1
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import test from 'node:test'
|
|
2
|
+
import assert from 'node:assert/strict'
|
|
3
|
+
import fs from 'node:fs'
|
|
4
|
+
import os from 'node:os'
|
|
5
|
+
import path from 'node:path'
|
|
6
|
+
import crypto from 'node:crypto'
|
|
7
|
+
import { Session } from 'node:inspector'
|
|
8
|
+
import { performance } from 'node:perf_hooks'
|
|
9
|
+
import { bm25 } from '../lib/text-retrieval.js'
|
|
10
|
+
import { createRtIndex, clearRtIndexCaches, rtIndexCacheStats, indexLocation } from '../lib/rt-index/reader.js'
|
|
11
|
+
|
|
12
|
+
const provenance = () => Object.fromEntries(['reader.js', 'builder.js', 'manifest.js', 'format.js'].map(name =>
|
|
13
|
+
[name, crypto.createHash('sha256').update(fs.readFileSync(new URL(`../lib/rt-index/${name}`, import.meta.url))).digest('hex')]))
|
|
14
|
+
|
|
15
|
+
async function profileQueries(run) {
|
|
16
|
+
const session = new Session()
|
|
17
|
+
session.connect()
|
|
18
|
+
const post = (method, params = {}) => new Promise((resolve, reject) => session.post(method, params,
|
|
19
|
+
(error, value) => error ? reject(error) : resolve(value)))
|
|
20
|
+
const calls = {}
|
|
21
|
+
const originals = new Map()
|
|
22
|
+
let profile
|
|
23
|
+
try {
|
|
24
|
+
await post('Profiler.enable')
|
|
25
|
+
await post('Profiler.setSamplingInterval', { interval: 100 })
|
|
26
|
+
await post('Profiler.start')
|
|
27
|
+
for (const name of ['lstatSync', 'openSync', 'readSync', 'closeSync']) {
|
|
28
|
+
const original = fs[name]
|
|
29
|
+
originals.set(name, original)
|
|
30
|
+
calls[name] = { calls: 0, ms: 0 }
|
|
31
|
+
fs[name] = function (...args) {
|
|
32
|
+
const start = performance.now()
|
|
33
|
+
try { return Reflect.apply(original, this, args) } finally {
|
|
34
|
+
calls[name].calls++
|
|
35
|
+
calls[name].ms += performance.now() - start
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
for (let i = 0; i < 9; i++) run()
|
|
40
|
+
;({ profile } = await post('Profiler.stop'))
|
|
41
|
+
} finally {
|
|
42
|
+
for (const [name, original] of originals) fs[name] = original
|
|
43
|
+
session.disconnect()
|
|
44
|
+
}
|
|
45
|
+
const nodes = new Map(profile.nodes.map(node => [node.id, node.callFrame]))
|
|
46
|
+
const sampled = new Map()
|
|
47
|
+
for (let i = 0; i < profile.samples.length; i++) {
|
|
48
|
+
const frame = nodes.get(profile.samples[i])
|
|
49
|
+
const key = `${frame.functionName || '(anonymous)'} ${frame.url}:${frame.lineNumber + 1}`
|
|
50
|
+
sampled.set(key, (sampled.get(key) || 0) + profile.timeDeltas[i] / 1000)
|
|
51
|
+
}
|
|
52
|
+
return { samples: 9, synchronousFs: calls,
|
|
53
|
+
cpuSelf: [...sampled].sort((a, b) => b[1] - a[1]).slice(0, 15).map(([frame, ms]) => ({ frame, ms })) }
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Opt in explicitly: this is a foundation benchmark, not an end-to-end recall claim.
|
|
57
|
+
const count = Number(process.env.DSH_MEMU_RT_SCALE_COUNT || 0)
|
|
58
|
+
test('bounded streaming foundation at the explicitly requested corpus size', { skip: !count, timeout: 600000 }, async t => {
|
|
59
|
+
const sourceProvenance = provenance()
|
|
60
|
+
assert.ok(Number.isSafeInteger(count) && count >= 100 && count <= 100000)
|
|
61
|
+
const directory = fs.mkdtempSync(path.join(os.tmpdir(), 'dmm-rt-scale-'))
|
|
62
|
+
t.after(() => { clearRtIndexCaches(); fs.rmSync(directory, { recursive: true, force: true }) })
|
|
63
|
+
const options = { directory, libraryId: 'foundation-scale', mode: 'on', logger: { warn() {} } }
|
|
64
|
+
const controller = createRtIndex(options)
|
|
65
|
+
const entries = {}
|
|
66
|
+
const syllables = [...'今天我们一起回到海边看星星讨论工作学习计划朋友旅行音乐家庭生活记忆城市春天花园雨水故事约定生日咖啡程序测试']
|
|
67
|
+
let seed = 1444
|
|
68
|
+
const random = () => { seed = (Math.imul(seed, 1664525) + 1013904223) >>> 0; return seed / 2 ** 32 }
|
|
69
|
+
for (let i = 0; i < count; i++) {
|
|
70
|
+
const length = 40 + Math.floor(random() * 561)
|
|
71
|
+
const ratio = 0.6 + random() * 0.35
|
|
72
|
+
const characters = []
|
|
73
|
+
for (let j = 0; j < length; j++) characters.push(random() < ratio ? syllables[Math.floor(random() * syllables.length)] : ' abcdef0123456789'[Math.floor(random() * 17)])
|
|
74
|
+
const hidden = i % 3 === 0
|
|
75
|
+
entries[`mem-scale-${i}`] = { title: `海边计划 ${i}`, content: characters.join('') + ` needle${i}`, visibility: hidden ? 'secret' : 'shared',
|
|
76
|
+
status: 'active', layer: 'long_term', createdAt: '2026-11-01T12:00:00Z', updatedAt: '2026-11-01T12:00:00Z' }
|
|
77
|
+
}
|
|
78
|
+
const source = { index: { entries }, revision: 'scale-r1', count }
|
|
79
|
+
globalThis.gc?.()
|
|
80
|
+
const beforeBuild = process.memoryUsage()
|
|
81
|
+
let start = performance.now()
|
|
82
|
+
const build = controller.rebuild(source)
|
|
83
|
+
const buildMs = performance.now() - start
|
|
84
|
+
const afterBuild = process.memoryUsage()
|
|
85
|
+
globalThis.gc?.()
|
|
86
|
+
const afterBuildGc = process.memoryUsage()
|
|
87
|
+
assert.equal(build.ok, true, JSON.stringify(build))
|
|
88
|
+
const { root } = indexLocation(options)
|
|
89
|
+
const pointer = JSON.parse(fs.readFileSync(path.join(root, 'current.json'), 'utf8'))
|
|
90
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(root, pointer.generation, 'manifest.json'), 'utf8'))
|
|
91
|
+
const bytes = manifest.segments.reduce((sum, segment) => sum + Object.values(segment.files).reduce((n, file) => n + file.size, 0), 0)
|
|
92
|
+
const postingsBytes = manifest.segments.reduce((sum, segment) => sum + segment.files['postings.bin'].size, 0)
|
|
93
|
+
const artifactCount = manifest.segments.reduce((sum, segment) => sum + Object.keys(segment.files).length, 0)
|
|
94
|
+
let predicates = 0
|
|
95
|
+
start = performance.now()
|
|
96
|
+
const view = controller.createView(source, { isVisible: entry => { predicates++; return entry.visibility !== 'secret' } })
|
|
97
|
+
const coldViewCreateMs = performance.now() - start
|
|
98
|
+
const query = ['needle1']
|
|
99
|
+
start = performance.now()
|
|
100
|
+
const first = view.score(query)
|
|
101
|
+
const coldQueryMs = performance.now() - start
|
|
102
|
+
assert.equal(first.backend, 'rt')
|
|
103
|
+
assert.deepEqual(first.hits.map(hit => hit.id), ['mem-scale-1'])
|
|
104
|
+
assert.equal(first.corpus.size, count - Math.ceil(count / 3))
|
|
105
|
+
let freshPredicates = 0
|
|
106
|
+
start = performance.now()
|
|
107
|
+
const freshView = controller.createView(source, { isVisible: entry => { freshPredicates++; return entry.visibility !== 'secret' } })
|
|
108
|
+
const authorizedViewCreateMs = performance.now() - start
|
|
109
|
+
start = performance.now()
|
|
110
|
+
const freshResult = freshView.score(query)
|
|
111
|
+
const authorizedViewFirstQueryMs = performance.now() - start
|
|
112
|
+
assert.equal(freshResult.backend, 'rt')
|
|
113
|
+
assert.deepEqual(freshResult.hits, first.hits)
|
|
114
|
+
assert.deepEqual(freshResult.corpus, first.corpus)
|
|
115
|
+
assert.equal(freshPredicates, count)
|
|
116
|
+
const admittedBefore = rtIndexCacheStats().io.admittedBytes
|
|
117
|
+
const samples = []
|
|
118
|
+
const readsBefore = rtIndexCacheStats().io.postingBytes
|
|
119
|
+
for (let i = 0; i < 9; i++) {
|
|
120
|
+
start = performance.now()
|
|
121
|
+
const result = view.score(query)
|
|
122
|
+
samples.push(performance.now() - start)
|
|
123
|
+
assert.equal(result.backend, 'rt')
|
|
124
|
+
assert.deepEqual(result.hits, first.hits)
|
|
125
|
+
}
|
|
126
|
+
assert.equal(predicates, count, 'warm queries must not rerun full-library visibility')
|
|
127
|
+
const cache = rtIndexCacheStats()
|
|
128
|
+
assert.equal(cache.io.admittedBytes, admittedBefore, 'warm queries must not cold-admit/hash all artifacts again')
|
|
129
|
+
assert.ok(cache.io.postingBytes - readsBefore < postingsBytes, 'query reads term spans, never complete postings')
|
|
130
|
+
assert.equal(cache.oversized, 0)
|
|
131
|
+
samples.sort((a, b) => a - b)
|
|
132
|
+
const profile = process.env.DSH_MEMU_RT_PROFILE === '1' ? await profileQueries(() => {
|
|
133
|
+
const result = view.score(query)
|
|
134
|
+
assert.equal(result.backend, 'rt')
|
|
135
|
+
assert.deepEqual(result.hits, first.hits)
|
|
136
|
+
}) : null
|
|
137
|
+
const frequentStart = performance.now()
|
|
138
|
+
const frequent = view.queryPostings(['海'])
|
|
139
|
+
const frequentQueryMs = performance.now() - frequentStart
|
|
140
|
+
assert.equal(frequent.backend, 'rt')
|
|
141
|
+
assert.ok(frequent.docs.size > 0)
|
|
142
|
+
assert.equal(frequent.docs.size, frequent.corpus.df.get('海'))
|
|
143
|
+
let frequentScores = null
|
|
144
|
+
if (process.env.DSH_MEMU_RT_GATE_PROFILE === '1') {
|
|
145
|
+
frequentScores = []
|
|
146
|
+
for (const tokens of [['海'], ['海', 'needle1', 'needle1']]) {
|
|
147
|
+
const rows = []
|
|
148
|
+
const memoryBefore = process.memoryUsage()
|
|
149
|
+
let result
|
|
150
|
+
for (let i = 0; i < 9; i++) {
|
|
151
|
+
start = performance.now()
|
|
152
|
+
result = view.score(tokens)
|
|
153
|
+
rows.push(performance.now() - start)
|
|
154
|
+
assert.equal(result.backend, 'rt')
|
|
155
|
+
assert.equal(result.stats.candidates, frequent.docs.size)
|
|
156
|
+
assert.equal(result.corpus.df.get('海'), frequent.docs.size)
|
|
157
|
+
assert.deepEqual(result.hits.map(hit => hit.id), tokens.length === 1 ? [] : ['mem-scale-1'])
|
|
158
|
+
}
|
|
159
|
+
rows.sort((a, b) => a - b)
|
|
160
|
+
frequentScores.push({ tokens, samples: rows.length, samplesMs: rows, p50Ms: rows[4], p95Ms: rows[8],
|
|
161
|
+
stats: result.stats, corpusSize: result.corpus.size, avgdl: result.corpus.avgdl,
|
|
162
|
+
df: [...result.corpus.df], hits: result.hits, memoryBefore, memoryAfter: process.memoryUsage(),
|
|
163
|
+
profile: process.env.DSH_MEMU_RT_PROFILE === '1' ? await profileQueries(() => {
|
|
164
|
+
assert.deepEqual(view.score(tokens).hits, result.hits)
|
|
165
|
+
}) : null })
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
let sourcePredicates = 0
|
|
169
|
+
start = performance.now()
|
|
170
|
+
const sourceView = createRtIndex({ ...options, mode: 'off' }).createView(source,
|
|
171
|
+
{ isVisible: entry => { sourcePredicates++; return entry.visibility !== 'secret' } })
|
|
172
|
+
const sourceViewCreateMs = performance.now() - start
|
|
173
|
+
start = performance.now()
|
|
174
|
+
const sourceResult = sourceView.score(query)
|
|
175
|
+
const sourceQueryMs = performance.now() - start
|
|
176
|
+
assert.equal(sourceResult.backend, 'source')
|
|
177
|
+
assert.deepEqual(first.hits, sourceResult.hits)
|
|
178
|
+
assert.deepEqual(first.corpus, sourceResult.corpus)
|
|
179
|
+
assert.equal(sourcePredicates, count)
|
|
180
|
+
assert.equal(predicates, count)
|
|
181
|
+
if (frequentScores) {
|
|
182
|
+
const sourcePostings = sourceView.queryPostings(['海', 'needle1'])
|
|
183
|
+
for (const result of frequentScores) {
|
|
184
|
+
const expected = [...sourcePostings.docs].map(([id, doc]) => ({ id, score: bm25(result.tokens, doc, sourcePostings.corpus) }))
|
|
185
|
+
.filter(hit => hit.score > 0)
|
|
186
|
+
assert.deepEqual(result.hits, expected)
|
|
187
|
+
assert.equal(result.corpusSize, sourcePostings.corpus.size)
|
|
188
|
+
assert.equal(result.avgdl, sourcePostings.corpus.avgdl)
|
|
189
|
+
for (const [term, df] of result.df) assert.equal(df, sourcePostings.corpus.df.get(term))
|
|
190
|
+
}
|
|
191
|
+
assert.deepEqual([...frequent.docs.keys()], [...sourcePostings.docs.keys()])
|
|
192
|
+
}
|
|
193
|
+
assert.deepEqual(provenance(), sourceProvenance, 'rt implementation must not change during the measurement')
|
|
194
|
+
console.log(JSON.stringify({ fixture: { count, seed: 1444, length: [40, 600], cjkRatio: [0.6, 0.95], gold: false },
|
|
195
|
+
scope: 'foundation-only; excludes JSON persistence, service, final memory ranking, shadow and host',
|
|
196
|
+
sourceProvenance, buildMs, segments: build.segments, artifactCount, artifactBytes: bytes, postingsBytes, coldViewCreateMs, coldQueryMs,
|
|
197
|
+
authorizedView: { createMs: authorizedViewCreateMs, firstQueryMs: authorizedViewFirstQueryMs,
|
|
198
|
+
totalMs: authorizedViewCreateMs + authorizedViewFirstQueryMs },
|
|
199
|
+
source: { createMs: sourceViewCreateMs, queryMs: sourceQueryMs, totalMs: sourceViewCreateMs + sourceQueryMs },
|
|
200
|
+
warmRareQuery: { samples: samples.length, samplesMs: samples, p50Ms: samples[4], p95Ms: samples[8] },
|
|
201
|
+
frequentQueryMs, frequentCandidates: frequent.docs.size, frequentScores, cache, profile,
|
|
202
|
+
memory: { beforeBuild, afterBuild, afterBuildGc, after: process.memoryUsage(), processPeakRssBytes: process.resourceUsage().maxRSS * 1024 },
|
|
203
|
+
}))
|
|
204
|
+
})
|