(vaultRoot, count)
| 202 | } |
| 203 | |
| 204 | async function seedVault(vaultRoot, count) { |
| 205 | const inbox = join(vaultRoot, 'inbox') |
| 206 | const quick = join(vaultRoot, 'quick') |
| 207 | const archive = join(vaultRoot, 'archive') |
| 208 | const trash = join(vaultRoot, 'trash') |
| 209 | await Promise.all([ |
| 210 | mkdir(inbox, { recursive: true }), |
| 211 | mkdir(quick, { recursive: true }), |
| 212 | mkdir(archive, { recursive: true }), |
| 213 | mkdir(trash, { recursive: true }) |
| 214 | ]) |
| 215 | |
| 216 | const files = [] |
| 217 | for (let index = 0; index < count; index += 1) { |
| 218 | const id = formatIndex(index) |
| 219 | const topic = index % 20 |
| 220 | const sprint = index % 13 |
| 221 | const title = `Perf Note ${id} Topic ${topic}` |
| 222 | const body = `# ${title} |
| 223 | |
| 224 | This is a synthetic desktop runtime benchmark note for ZenNotes. |
| 225 | It contains searchable token desktop-runtime-benchmark-${id} and shared topic-${topic}. |
| 226 | |
| 227 | ## Details |
| 228 | |
| 229 | - Index: ${index} |
| 230 | - Topic: ${topic} |
| 231 | - Sprint: ${sprint} |
| 232 | - Status: ${index % 3 === 0 ? 'active' : 'reference'} |
| 233 | |
| 234 | The body is intentionally modest so note-open timing measures app overhead more than disk throughput. |
| 235 | |
| 236 | #perf #topic-${topic} #sprint-${sprint} |
| 237 | ${largeNoteLines > 0 && index === Math.min(count - 1, largeNoteIndex) ? largeNoteBody(largeNoteLines, id) : ''}` |
| 238 | files.push([join(inbox, `${id} - topic-${topic}.md`), body]) |
| 239 | } |
| 240 | await writeFilesInBatches(files) |
| 241 | } |
| 242 | |
| 243 | async function seedUserData(userDataRoot, vaultRoot) { |
| 244 | await mkdir(userDataRoot, { recursive: true }) |
no test coverage detected